Skip to content

Commit

Permalink
version 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristin K. Nicodemus authored and gaborcsardi committed Jun 6, 2008
1 parent db5e164 commit 5618c00
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 26 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
@@ -1,9 +1,9 @@
Package: catmap
Version: 1.4
Date: 2008-01-21
Version: 1.5
Date: 2008-06-06
Title: Case-control And Tdt Meta-Analysis Package
Author: Kristin K. Nicodemus <kristin.nicodemus@well.ox.ac.uk>
Maintainer: Kristin K. Nicodemus <kristin.nicodemus@well.ox.ac.uk>
Description: catmap is an R package that conducts fixed-effects (inverse variance) and random-effects (DerSimonian and Laird, 1986) meta-analyses of case-control or family-based (TDT) genetic data; in addition, it performs meta-analyses combining these two types of study designs. The fixed-effects model was first described by Kazeem and Farrell (2005); the random-effects model is described in Nicodemus (submitted).
License: GPL (version 2 or newer)
Packaged: Mon Jan 21 10:17:53 2008; knicodemus
Packaged: Fri Jun 6 12:04:03 2008; knicodemus
22 changes: 11 additions & 11 deletions R/catmap.R
Expand Up @@ -70,13 +70,13 @@ logOR<-studyorder3[,4]
seLogOR<-studyorder3[,5]
comvarlogOR<-studyorder3[,6]
}

#get qnorm values
alpha<-(1-((1-ci)/2))
quantilenorm<-qnorm(alpha, 0, 1)
OR1<-exp(logOR1)
lbci1<-exp(logOR1-(quantilenorm*seLogOR1))
ubci1<-exp(logOR1-(quantilenorm*seLogOR1))
OR1<-exp(logOR)
lbci1<-exp(logOR-(quantilenorm*seLogOR))
ubci1<-exp(logOR+(quantilenorm*seLogOR))

combinedLogOR<-((sum(weight*logOR))/sum(weight))
combinedOR<-exp(combinedLogOR)
Expand Down Expand Up @@ -116,7 +116,7 @@ cat("\n")
if(print.all==TRUE){
ind.header<-c("Study", "Fixed-Effects ORs", "Lower Bound CIs", "Upper Bound CIs", "Study Weights")
dataname<-as.vector(a1$name)
ind.fill<-data.frame(cbind(dataname, as.list(OR1), as.list(lbci1), as.list(ubci1), as.list(weight)))
ind.fill<-data.frame(cbind(dataname, as.list(exp(studyorder3[,3])), as.list(lbci1), as.list(ubci1), as.list(weight)))
names(ind.fill)<-ind.header
cat("Individual Study Estimates\n")
print(ind.fill)
Expand All @@ -140,8 +140,8 @@ pvalue.dsl<-(1-value.dsl)

#print results - print to screen

table.header<-c("Inverse Variance Fixed-Effects OR", "Inverse Variance Fixed-Effects Lower Bound CI", "Inverse Variance Fixed-Effects Upper Bound CI", "Inverse Variance Fixed-Effects Chi-Square", "Inverse Variance Fixed-Effects p-value", "Q Statistic (Heterogeneity) Chi-Square", "Q Statistic (Heterogeneity) p-value", "DerSimonian & Laird Random-Effects OR", "DerSimonian & Laird Random-Effects Lower Bound CI", "DerSimonian & Laird Random-Effects Chi-Square", "DerSimonian & Laird Random-Effects p-value")
table.fill<-c(combinedOR, combinedCI, combinedChisq, combinedPvalue, chisqHet, heterogeneityPvalue, OR.dsl, chisq.dsl, pvalue.dsl)
table.header<-c("Inverse Variance Fixed-Effects OR", "Inverse Variance Fixed-Effects Lower Bound CI", "Inverse Variance Fixed-Effects Upper Bound CI", "Inverse Variance Fixed-Effects Chi-Square", "Inverse Variance Fixed-Effects p-value", "Q Statistic (Heterogeneity) Chi-Square", "Q Statistic (Heterogeneity) p-value", "DerSimonian & Laird Random-Effects OR", "DerSimonian & Laird Random-Effects Lower Bound CI", "DerSiminian & Laird Random-Effects Upper Bound CI", "DerSimonian & Laird Random-Effects Chi-Square", "DerSimonian & Laird Random-Effects p-value")
table.fill<-c(combinedOR, combinedCI, combinedChisq, combinedPvalue, chisqHet, heterogeneityPvalue, OR.dsl, lbci.dsl, ubci.dsl, chisq.dsl, pvalue.dsl)
results<-rbind(table.header, round(table.fill, digits=5))
cat("Pooled Estimates\n")
cat(results, sep="\n")
Expand Down Expand Up @@ -331,8 +331,8 @@ srvalue.dsl<-pchisq(srchisq.dsl, df=1)
srpvalue.dsl<-(1-srvalue.dsl)

srstudy.removed<-paste("Study Removed =", catmapobject$studyname[r], sep=" ")
srtable.header<-c("Q Statistic (Heterogeneity) Chi-Square", "Q Statistic (Heterogeneity) p-value", "DerSimonian & Laird Random-Effects OR", "DerSimonian & Laird Random-Effects Lower Bound CI", "DerSimonian & Laird Random-Effects Chi-Square", "DerSimonian & Laird Random-Effects p-value")
srtable.fill<-c(sr.chisqHet, sr.heterogeneityPvalue, srOR.dsl, srci.dsl, srpvalue.dsl)
srtable.header<-c("Q Statistic (Heterogeneity) Chi-Square", "Q Statistic (Heterogeneity) p-value", "DerSimonian & Laird Random-Effects OR", "DerSimonian & Laird Random-Effects Lower Bound CI", "DerSimonian & Laird Random-Effects Upper Bound CI", "DerSimonian & Laird Random-Effects Chi-Square", "DerSimonian & Laird Random-Effects p-value")
srtable.fill<-c(sr.chisqHet, sr.heterogeneityPvalue, srOR.dsl, srlbci.dsl, srubci.dsl, srchisq.dsl, srpvalue.dsl)
sr.results<-rbind(srtable.header, round(srtable.fill, digits=5))
srvalues<-c(srOR.dsl, srci.dsl)
srplot[r,]<-srvalues
Expand Down Expand Up @@ -572,8 +572,8 @@ crvalue.dsl<-pchisq(crchisq.dsl, df=1)
crpvalue.dsl<-(1-crvalue.dsl)

crstudy.added<-paste("Study Added =", catmapobject$studyname[u], sep=" ")
crtable.header<-c("Q Statistic (Heterogeneity) Chi-Square", "Q Statistic (Heterogeneity) p-value", "DerSimonian & Laird Random-Effects OR", "DerSimonian & Laird Random-Effects Lower Bound CI", "DerSimonian & Laird Random-Effects Chi-Square", "DerSimonian & Laird Random-Effects p-value")
crtable.fill<-c(cr.chisqHet, cr.heterogeneityPvalue, crOR.dsl, crci.dsl, crpvalue.dsl)
crtable.header<-c("Q Statistic (Heterogeneity) Chi-Square", "Q Statistic (Heterogeneity) p-value", "DerSimonian & Laird Random-Effects OR", "DerSimonian & Laird Random-Effects Lower Bound CI", "DerSimonian & Laird Random-Effects Upper Bound CI", "DerSimonian & Laird Random-Effects Chi-Square", "DerSimonian & Laird Random-Effects p-value")
crtable.fill<-c(cr.chisqHet, cr.heterogeneityPvalue, crOR.dsl, crlbci.dsl, crubci.dsl, crchisq.dsl, crpvalue.dsl)
cr.results<-rbind(crtable.header, round(crtable.fill, digits=5))
crvalues<-c(crOR.dsl, crci.dsl)
crplot[v,]<-crvalues
Expand Down
Empty file added man/.Rd2dvi/Rd2.log
Empty file.
14 changes: 14 additions & 0 deletions man/.Rd2dvi/Rd2.tex
@@ -0,0 +1,14 @@
\nonstopmode{}
\documentclass[a4paper]{book}
\usepackage[times,hyper]{Rd}
\usepackage{makeidx}
\makeindex{}
\begin{document}
\chapter*{}
\begin{center}
{\textbf{\huge The catmap package}}
\par\bigskip{\large \today}
\end{center}

\printindex{}
\end{document}
15 changes: 15 additions & 0 deletions man/.Rd2dvi/Rd2.tex.pre
@@ -0,0 +1,15 @@
\nonstopmode{}
\documentclass[a4paper]{book}
\usepackage[times,hyper]{Rd}
\usepackage{makeidx}
\usepackage[@ENC@]{inputenc}
\makeindex{}
\begin{document}
\chapter*{}
\begin{center}
{\textbf{\huge The catmap package}}
\par\bigskip{\large \today}
\end{center}

\printindex{}
\end{document}
5 changes: 3 additions & 2 deletions man/catmap.Rd
Expand Up @@ -5,7 +5,7 @@
\author{Kristin K. Nicodemus, \email{kristin.nicodemus@well.ox.ac.uk}}
\description{
\code{catmap} is an R package that conducts fixed-effects (inverse variance) and random-effects (DerSimonian and Laird, 1986) meta-analyses of case-control or family-based (TDT) genetic data; in addition, it performs meta-analyses combining these two types of study designs. The fixed-effects model was first described by Kazeem and Farrall (2005); the random-effects model is described in Nicodemus (submitted) and saves a text file to the current working directory of all results printed to screen (use getwd() to find cwd).
}
}
\usage{catmapobject<-catmap(dataset, ci, printout, print.all) }
\arguments{
\item{dataset}{A text file containing a header with the following column names: \bold{name, study, t, nt, caserisk, controlrisk, casenotrisk, controlnotrisk} in tab-delimited format. Note that the header must be exactly as specified and that all cells in the table must have an entry, even if the entry is 0 or missing (NA). See for example: data(catmapdata). \bold{The dataset argument to catmap should be either the example data or a file containing the data for catmap, not an R object.}
Expand All @@ -25,7 +25,8 @@
\examples{
\dontrun{
data(catmapdata)
catmap(catmapdata, 0.95, TRUE, TRUE)
#Incorrect usage: catmap(catmapdata, 0.95, TRUE, TRUE)
#Correct usage:
catmapobject1<-catmap(catmapdata, 0.95, TRUE, TRUE)}}
\keyword{methods}

7 changes: 3 additions & 4 deletions man/catmap.cumulative.Rd
Expand Up @@ -12,13 +12,12 @@ re.cumplot) }
\item{fe.cumulative}{Logical. Should a cumulative meta-analysis be performed using fixed-effects estimates? catmap assumes the order in which the studies are listed is the chronological ordering. Automatic output result file is saved with the default name of \bold{dataset.fixed.effects.cumulative
.txt}, where dataset is the name of the file given as the first argument to catmap. Note that repeated runs of the same input file will be appended to the default output file.}
\item{re.cumulative}{Logical. Should a cumulative meta-analysis be performed using random-effects estimates? catmap assumes the order in which the studies are listed is the chronological ordering. Automatic output result file is saved with the default name of \bold{dataset.random.effects.cumulative .txt}, where dataset is the name of the file given as the first argument to catmap. Note that repeated runs of the same input file will be appended to the default output file. Also note that random-effects estimates are undefined for a single study; calculations begin with the first 2 studies and then adds studies to them in a cumulative fashion. The OR and CI for the first study may be found using the fixed effects estimates.}
\item{fe.cumplot}{Logical. Should a .pdf plot of the ORs and CIs from the cumulative meta-analysis using fixed-effects be output? Can be TRUE only if fe.cumulative=TRUE. Output plot file is saved with the default name of \bold{dataset.fixed.effects.cumulative
.plot.pdf} where dataset is the name of the file given as the first argument to catmap.}
\item{re.cumplot}{Logical. Should a .pdf plot of the ORs and CIs from the cumulative meta-analysis using random-effects be output? Can be TRUE only if re.cumulative= TRUE. Output plot file is saved with the default name of \bold{dataset.random.effects
\item{fe.cumplot}{Logical. Should a .pdf plot of the ORs and CIs from the cumulative meta-analysis using fixed-effects be output? Can be TRUE only if fe.cumulative =TRUE. Output plot file is saved with the default name of \bold{dataset.fixed. effects.cumulative.plot.pdf} where dataset is the name of the file given as the first argument to catmap.}
\item{re.cumplot}{Logical. Should a .pdf plot of the ORs and CIs from the cumulative meta-analysis using random-effects be output? Can be TRUE only if re.cumulative= TRUE. Output plot file is saved with the default name of \bold{dataset.random. effects
.cumulative.plot.pdf} where dataset is the name of the file given as the first argument to catmap.}
}
\details{
\code{catmap.cumulative} conducts cumulative meta-analyses and creates .pdf files of plots of the ORs and CIs using either the fixed-effect or the random-effect estimates.
\code{catmap.cumulative} conducts cumulative meta-analyses and creates .pdf files of plots of the ORs and CIs using either the fixed-effect or the random-effect estimates. \bold{NOTE: The studies should be listed in chronological order in the input file. \code{catmap.cumulative} does not re-order studies by publication year.}
}
\seealso{
\code{\link{catmap}},
Expand Down
3 changes: 2 additions & 1 deletion man/catmap.forest.Rd
Expand Up @@ -9,7 +9,7 @@
\arguments{
\item{catmapobject}{The catmap object created by a previous call to catmap}
\item{fe.forest}{Logical. Should a forest plot be created using the fixed-effects estimates? Plots are saved with the default name of \bold{dataset.fixed.effects.forest.pdf}, where dataset is the name of the file given as the first argument to catmap.}
\item{re.forest}{Logical. Should a forest plot be created using the random-effects estimates? Plots are saved with the default name of \bold{dataset.random.effects.forest.pdf} where dataset is the name of the file given as the first argument to catmap.}
\item{re.forest}{Logical. Should a forest plot be created using the random-effects estimates? Plots are saved with the default name of \bold{dataset.random.effects. forest.pdf} where dataset is the name of the file given as the first argument to catmap.}
}
\details{
\code{catmap.forest} creates forest plots of individual study ORs and CIs plus the pooled estimate of the fixed- or random-effects pooled OR and CI. Plots are not created in the R Graphics device window, but are instead saved to a .pdf file in the current working directory, which can be found using getwd()
Expand All @@ -26,3 +26,4 @@ data(catmapdata)
catmapobject1<-catmap(catmapdata, 0.95, TRUE)
catmap.cumulative(catmapobject1, TRUE, TRUE, TRUE, TRUE)}}
\keyword{methods}

2 changes: 1 addition & 1 deletion man/catmap.funnel.Rd
Expand Up @@ -4,7 +4,7 @@
\author{Kristin K. Nicodemus, \email{kristin.nicodemus@well.ox.ac.uk}}
\description{
\code{catmap.funnel} creates a funnel plot of the individual ORs against the se and saves the file to the current working directory (use getwd() to view). The plots are not created in the R Graphics device.
}
}
\usage{catmap.funnel(catmapobject, funnel) }
\arguments{
\item{catmapobject}{The catmap object created by a previous call to catmap}
Expand Down
6 changes: 3 additions & 3 deletions man/catmap.sense.Rd
Expand Up @@ -4,14 +4,14 @@
\author{Kristin K. Nicodemus, \email{kristin.nicodemus@well.ox.ac.uk}}
\description{
\code{catmap.sense} conducts leave-one-out sensitivity analyses and creates plots of the ORs and confidence intervals using either fixed- or random-effects analyses, which are saved to the current working directory (use getwd() to view) but does not create the plots in the R Graphics device.
}
}
\usage{catmap.sense(catmapobject, fe.sense, re.sense, fe.senseplot, re.senseplot) }
\arguments{
\item{catmapobject}{The catmap object created by a previous call to catmap}
\item{fe.sense}{Logical. Should a leave-one-out sensitivity analysis be performed using fixed-effects estimates? Automatic output result files are saved with the default name of \bold{dataset.fixed.effects.sensitivity.txt}, where dataset is the name of the file given as the first argument to catmap. Note that repeated runs of the same input file will be appended to the default output file names.}
\item{re.sense}{Logical. Should a leave-one-out sensitivity analysis be performed using random-effects estimates? Automatic output result files are saved with the default name of \bold{dataset.random.effects.sensitivity.txt}, where dataset is the name of the file given as the first argument to catmap. Note that repeated runs of the same input file will be appended to the default output file names.}
\item{fe.senseplot}{Logical. Should a .pdf plot of the ORs and CIs from the sensitivity analysis using fixed-effects be output? Can be TRUE only if fe.sense=TRUE. Output plot file is saved with the default name of \bold{dataset.fixed.effects.sensitivity.plot.pdf} where dataset is the name of the file given as the first argument to catmap.}
\item{re.senseplot}{Logical. Should a .pdf plot of the ORs and CIs from the sensitivity analysis using random-effects be output? Can be TRUE only if re.sense=TRUE. Output plot file is saved with the default name of \bold{dataset.random.effects.sensitivity.plot. pdf} where dataset is the name of the file given as the first argument to catmap.}
\item{fe.senseplot}{Logical. Should a .pdf plot of the ORs and CIs from the sensitivity analysis using fixed-effects be output? Can be TRUE only if fe.sense=TRUE. Output plot file is saved with the default name of \bold{dataset.fixed.effects. sensitivity.plot.pdf} where dataset is the name of the file given as the first argument to catmap.}
\item{re.senseplot}{Logical. Should a .pdf plot of the ORs and CIs from the sensitivity analysis using random-effects be output? Can be TRUE only if re.sense=TRUE. Output plot file is saved with the default name of \bold{dataset.random.effects. sensitivity.plot. pdf} where dataset is the name of the file given as the first argument to catmap.}
}
\details{
\code{catmap.sense} conducts leave-one-out sensitivity analyses and creates .pdf files of plots of the ORs and CIs using either the fixed-effect or the random-effect estimates. Plots are not created in the R Graphics device window, but are instead saved to a .pdf file in the current working directory. Likewise the .txt files of results will be saved to the current working directory. To find the current working directory, use getwd()
Expand Down
2 changes: 1 addition & 1 deletion man/catmapdata.Rd
@@ -1,6 +1,6 @@
\name{catmapdata}
\alias{catmapdata}
\docType{data}
\docType{data}
\title{An example data frame for use with catmap}
\author{Kristin K. Nicodemus, \email{kristin.nicodemus@well.ox.ac.uk}}
\description{
Expand Down

0 comments on commit 5618c00

Please sign in to comment.