diff --git a/DESCRIPTION b/DESCRIPTION index 135adc6..2a67703 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,9 +1,9 @@ Package: catmap -Version: 1.0 +Version: 1.1 Date: 2007-06-09 Title: Case-control And Tdt Meta-Analysis Package Author: Kristin K. Nicodemus Maintainer: Kristin K. Nicodemus 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: Sat Jun 9 15:10:07 2007; Owner +Packaged: Tue Jun 12 07:37:23 2007; Owner diff --git a/R/catmap.R b/R/catmap.R index eb0c42f..6157029 100755 --- a/R/catmap.R +++ b/R/catmap.R @@ -1,8 +1,5 @@ -`catmap` <- -function(dataset, ci, fe.forest, re.forest, printout, fe.sense, fe.senseplot, re.sense, re.senseplot, fe.cumulative, fe.cumplot, re.cumulative, re.cumplot, funnel){ - +catmap<-function(dataset, ci, printout){ options(warn=-1) - data(catmapdata) #read in data from function @@ -119,6 +116,7 @@ cat("\n") } +studyname<-a1$name #print results to file dataset.output.txt @@ -136,16 +134,20 @@ cat(results, sep="\n") sink() } +return(comvarlogOR, combinedLogOR, combinedOR, combinedSeLogOR, weight, logOR, combinedVarLogOR, combinedChisq, combinedValue, combinedPvalue, lbci, ubci, combinedCI, SeLogOR, lbci.fe, ubci.fe, het.df, chisqHet, combinedHetValue, heterogeneityPvalue, tau2, weight.dsl, logOR.dsl, OR.dsl, seLogOR.dsl, varLogOR.dsl, lbci.dsl, ubci.dsl, ci.dsl, chisq.dsl, value.dsl, pvalue.dsl, studyname, a1, quantilenorm, ci, dataset) +} #sensitivity analysis +catmap.sense<-function(catmapobject, fe.sense, re.sense, fe.senseplot, re.senseplot){ + #fixed-effects sensitivity if (fe.sense==TRUE){ -sfplot<-matrix(0,nrow(a1),3) -for(f in 1:nrow(a1)){ -sf.weight<-weight[-f] -sf.logOR<-logOR[-f] +sfplot<-matrix(0,nrow(catmapobject$a1),3) +for(f in 1:nrow(catmapobject$a1)){ +sf.weight<-catmapobject$weight[-f] +sf.logOR<-catmapobject$logOR[-f] sf.combinedLogOR<-((sum(sf.weight*sf.logOR))/sum(sf.weight)) sf.combinedOR<-exp(sf.combinedLogOR) @@ -156,7 +158,7 @@ sf.combinedValue<-pchisq(sf.combinedChisq, df=1) sf.combinedPvalue<-(1-sf.combinedValue) #get qnorm values -alpha<-(1-((1-ci)/2)) +alpha<-(1-((1-catmapobject$ci)/2)) quantilenorm<-qnorm(alpha, 0, 1) sf.lbci<-exp(sf.combinedLogOR-(quantilenorm*sf.combinedSeLogOR)) @@ -167,12 +169,12 @@ sf.lbci<-exp(sf.logOR-(quantilenorm*sf.SeLogOR)) sf.ubci<-exp(sf.logOR+(quantilenorm*sf.SeLogOR)) #calculate heterogeneity -sf.df<-(nrow(a1)-2) sf.chisqHet<-(sum(sf.weight*(((sf.logOR-sf.combinedLogOR)^2)))) +sf.df<-(nrow(catmapobject$a1)-2) sf.combinedHetValue<-pchisq(sf.chisqHet, df=sf.df) sf.heterogeneityPvalue<-(1-sf.combinedHetValue) -study.removed<-paste("Study Removed =", a1$name[f], sep=" ") +study.removed<-paste("Study Removed =", catmapobject$studyname[f], sep=" ") sftable.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") sftable.fill<-c(sf.combinedOR, sf.combinedCI, sf.combinedChisq, sf.combinedPvalue, sf.chisqHet, sf.heterogeneityPvalue) sf.results<-rbind(sftable.header, round(sftable.fill, digits=5)) @@ -184,15 +186,15 @@ cat("\n") #print results to file dataset.fixed.effects.sensitivity.txt -if(dataset!=catmapdata){ -sink(paste(dataset, "fixed.effects.sensitivity.txt", sep="."), append=TRUE) +if(catmapobject$dataset!=catmapdata){ +sink(paste(catmapobject$dataset, "fixed.effects.sensitivity.txt", sep="."), append=TRUE) cat("Fixed Effects Sensitivity Analysis\n") cat(study.removed, sf.results, sep="\n") cat("\n") sink() } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ sink(paste("catmapdata", "fixed.effects.sensitivity.txt", sep="."), append=TRUE) cat("Fixed Effects Sensitivity Analysis\n") cat(study.removed, sf.results, sep="\n") @@ -204,12 +206,12 @@ sink() #random-effects sensitivity -if (re.sense==TRUE & tau2 > 0){ -srplot<-matrix(0,nrow(a1),3) -for(r in 1:nrow(a1)){ -sr.weight<-weight[-r] -sr.logOR<-logOR[-r] -sr.comvarlogOR<-comvarlogOR[-r] +if (re.sense==TRUE & catmapobject$tau2 > 0){ +srplot<-matrix(0,nrow(catmapobject$a1),3) +for(r in 1:nrow(catmapobject$a1)){ +sr.weight<-catmapobject$weight[-r] +sr.logOR<-catmapobject$logOR[-r] +sr.comvarlogOR<- catmapobject$comvarlogOR[-r] sr.combinedLogOR<-((sum(sr.weight*sr.logOR))/sum(sr.weight)) sr.combinedOR<-exp(sr.combinedLogOR) @@ -220,7 +222,7 @@ sr.combinedValue<-pchisq(sr.combinedChisq, df=1) sr.combinedPvalue<-(1-sr.combinedValue) #get qnorm values -alpha<-(1-((1-ci)/2)) +alpha<-(1-((1-catmapobject$ci)/2)) quantilenorm<-qnorm(alpha, 0, 1) sr.lbci<-exp(sr.combinedLogOR-(quantilenorm*sr.combinedSeLogOR)) @@ -231,7 +233,7 @@ sr.lbci<-exp(sr.logOR-(quantilenorm*sr.SeLogOR)) sr.ubci<-exp(sr.logOR+(quantilenorm*sr.SeLogOR)) #calculate heterogeneity -sr.df<-(nrow(a1)-2) +sr.df<-(nrow(catmapobject$a1)-2) sr.chisqHet<-(sum(sr.weight*(((sr.logOR-sr.combinedLogOR)^2)))) sr.combinedHetValue<-pchisq(sr.chisqHet, df=sr.df) sr.heterogeneityPvalue<-(1-sr.combinedHetValue) @@ -254,7 +256,7 @@ srvalue.dsl<-pchisq(srchisq.dsl, df=1) srpvalue.dsl<-(1-srvalue.dsl) } -srstudy.removed<-paste("Study Removed =", a1$name[r], sep=" ") +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) sr.results<-rbind(srtable.header, round(srtable.fill, digits=5)) @@ -266,15 +268,15 @@ cat("\n") #print results to file dataset.random.effects.sensitivity.txt -if(dataset!=catmapdata){ -sink(paste(dataset, "random.effects.sensitivity.txt", sep="."), append=TRUE) +if(catmapobject$dataset!=catmapdata){ +sink(paste(catmapobject$dataset, "random.effects.sensitivity.txt", sep="."), append=TRUE) cat("Random Effects Sensitivity Analysis\n") cat(srstudy.removed, sr.results, sep="\n") cat("\n") sink() } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ sink(paste("catmapdata", "random.effects.sensitivity.txt", sep="."), append=TRUE) cat("Random Effects Sensitivity Analysis\n") cat(srstudy.removed, sr.results, sep="\n") @@ -284,14 +286,92 @@ sink() } } +ci100<- catmapobject$ci*100 + +#create fixed-effects sensitivity plots +if (fe.senseplot==TRUE){ +if(catmapobject$dataset!=catmapdata){ +pdf(file=(paste(catmapobject$dataset, "fixed.effects.sensitivity.plot.pdf", sep="."))) +} +if(catmapobject$dataset==catmapdata){ +pdf(file=(paste("catmapdata", "fixed.effects.sensitivity.plot.pdf", sep="."))) +} +sfpstudy<-c(1:nrow(catmapobject$a1)) +sfplx<-max((min(sfplot[,2])-0.25),0) +sfphx<-max(sfplot[,3])+0.25 +sfply<-min(sfpstudy)-0.5 +sfphy<-max(sfpstudy)+0.5 +mar1<-c(5.1, 7.1, 4.1, 2.1) +las1<-1 +par("las"=las1) +par("mar"=mar1) +sfpdummy<-c(rep(NA, length(sfpstudy))) +sfpdummy[1]<- sfphx +sfpdummy[2]<- sfplx +sfpydummy<-c(rep(NA, length(sfpstudy))) +sfpydummy[1]<- sfphy +sfpydummy[2]<- sfply +xtitle<-paste("OR(", ci100, "% CI)") +plot(sfpdummy, sfpydummy, type="n", log="x", ylab="", ylim=rev(c(sfply, sfphy)), yaxt="n", xlab=xtitle, main="Sensitivity Analysis: \n Inverse Variance (Fixed-Effects) ORs") +abline(v=1.0) +for(z in 1:nrow(catmapobject$a1)){ +points(sfplot[z,1],sfpstudy[z], pch=22, bg="black", col="black") +segments(sfplot[z,2],sfpstudy[z],sfplot[z,3],sfpstudy[z], bg="black", col="black") +sfpstudyname<-paste("Study Removed:", catmapobject$studyname[z], sep="\n") +mtext(paste(sfpstudyname),side=2, at=sfpstudy[z], cex=0.80) +} +dev.off() +} + +ci100<- catmapobject$ci*100 + +#create random-effects sensitivity plots +if (re.senseplot==TRUE & catmapobject$tau2 > 0){ +if(catmapobject$dataset!=catmapdata){ +pdf(file=(paste(catmapobject$dataset, "random.effects.sensitivity.plot.pdf", sep="."))) +} +if(catmapobject$dataset==catmapdata){ +pdf(file=(paste("catmapdata", "random.effects.sensitivity.plot.pdf", sep="."))) +} +srpstudy<-c(1:nrow(catmapobject$a1)) +srplx<-max((min(srplot[,2])-0.25),0) +srphx<-max(srplot[,3])+0.25 +srply<-min(srpstudy)-0.5 +srphy<-max(srpstudy)+0.5 +mar1<-c(5.1, 7.1, 4.1, 2.1) +las1<-1 +par("las"=las1) +par("mar"=mar1) +srpdummy<-c(rep(NA, length(srpstudy))) +srpdummy[1]<- srphx +srpdummy[2]<- srplx +srpydummy<-c(rep(NA, length(srpstudy))) +srpydummy[1]<- srphy +srpydummy[2]<- srply +xtitle<-paste("OR(", ci100, "% CI)") +plot(srpdummy, srpydummy, type="n", log="x", ylab="", ylim=rev(c(srply, srphy)), yaxt="n", xlab=xtitle, main="Sensitivity Analysis: \n DerSimonian & Laird (Random-Effects) ORs") +abline(v=1.0) +for(y in 1:nrow(catmapobject$a1)){ +points(srplot[y,1],srpstudy[y], pch=22, bg="black", col="black") +segments(srplot[y,2],srpstudy[y],srplot[y,3],srpstudy[y], bg="black", col="black") +srpstudyname<-paste("Study Removed:", catmapobject$studyname[y], sep="\n") +mtext(paste(srpstudyname),side=2, at=srpstudy[y], cex=0.80) +} +#dev.off() +} +} + +catmap.cumulative<-function(catmapobject, fe.cumulative, fe.cumplot, re.cumulative, re.cumplot){ + #fixed-effect cumulative meta analyses +ci100<- catmapobject$ci*100 if (fe.cumulative==TRUE){ -cfplot<-matrix(0, nrow(a1),3) -for(c in 1:nrow(a1)){ -cf.weight<-weight[1:c] -cf.logOR<-logOR[1:c] +cfplot<-matrix(0, nrow(catmapobject$a1),3) +for(c in 1:nrow(catmapobject$a1)){ +cf.weight<- catmapobject$weight[1:c] +cf.logOR<- catmapobject$logOR[1:c] cf.combinedLogOR<-((sum(cf.weight*cf.logOR))/sum(cf.weight)) cf.combinedOR<-exp(cf.combinedLogOR) @@ -302,7 +382,7 @@ cf.combinedValue<-pchisq(cf.combinedChisq, df=1) cf.combinedPvalue<-(1-cf.combinedValue) #get qnorm values -alpha<-(1-((1-ci)/2)) +alpha<-(1-((1-catmapobject$ci)/2)) quantilenorm<-qnorm(alpha, 0, 1) cf.lbci<-exp(cf.combinedLogOR-(quantilenorm*cf.combinedSeLogOR)) @@ -318,7 +398,7 @@ cf.chisqHet<-(sum(cf.weight*(((cf.logOR-cf.combinedLogOR)^2)))) cf.combinedHetValue<-pchisq(cf.chisqHet, df=cf.df) cf.heterogeneityPvalue<-(1-cf.combinedHetValue) -study.added<-paste("Study Added =", a1$name[c], sep=" ") +study.added<-paste("Study Added =", catmapobject$studyname[c], sep=" ") cftable.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") cftable.fill<-c(cf.combinedOR, cf.combinedCI, cf.combinedChisq, cf.combinedPvalue, cf.chisqHet, cf.heterogeneityPvalue) cf.results<-rbind(cftable.header, round(cftable.fill, digits=5)) @@ -330,15 +410,15 @@ cat("\n") #print results to file dataset.fixed.effects.cumulative.txt -if(dataset!=catmapdata){ -sink(paste(dataset, "fixed.effects.cumulative.txt", sep="."), append=TRUE) +if(catmapobject$dataset!=catmapdata){ +sink(paste(catmapobject$dataset, "fixed.effects.cumulative.txt", sep="."), append=TRUE) cat("Fixed Effects Cumulative Meta-Analysis\n") cat(study.added, cf.results, sep="\n") cat("\n") sink() } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ sink(paste("catmapdata", "fixed.effects.cumulative.txt", sep="."), append=TRUE) cat("Fixed Effects Cumulative Meta-Analysis\n") cat(study.added, cf.results, sep="\n") @@ -350,13 +430,13 @@ sink() #random-effect cumulative meta analyses -if (re.cumulative==TRUE & tau2 > 0){ -crplot<-matrix(0,(nrow(a1)-1),3) -for(u in 2:nrow(a1)){ +if (re.cumulative==TRUE & catmapobject$tau2 > 0){ +crplot<-matrix(0,(nrow(catmapobject$a1)-1),3) +for(u in 2:nrow(catmapobject$a1)){ v<-u-1 -cr.weight<-weight[1:u] -cr.logOR<-logOR[1:u] -cr.comvarlogOR<-comvarlogOR[1:u] +cr.weight<- catmapobject$weight[1:u] +cr.logOR<- catmapobject$logOR[1:u] +cr.comvarlogOR<- catmapobject$comvarlogOR[1:u] cr.combinedLogOR<-((sum(cr.weight*cr.logOR))/sum(cr.weight)) cr.combinedOR<-exp(cr.combinedLogOR) @@ -367,7 +447,7 @@ cr.combinedValue<-pchisq(cr.combinedChisq, df=1) cr.combinedPvalue<-(1-cr.combinedValue) #get qnorm values -alpha<-(1-((1-ci)/2)) +alpha<-(1-((1- catmapobject$ci)/2)) quantilenorm<-qnorm(alpha, 0, 1) cr.lbci<-exp(cr.combinedLogOR-(quantilenorm*cr.combinedSeLogOR)) @@ -401,7 +481,7 @@ crvalue.dsl<-pchisq(crchisq.dsl, df=1) crpvalue.dsl<-(1-crvalue.dsl) } -crstudy.added<-paste("Study Added =", a1$name[u], sep=" ") +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) cr.results<-rbind(crtable.header, round(crtable.fill, digits=5)) @@ -413,15 +493,15 @@ cat("\n") #print results to file dataset.random.effects.cumulative.txt -if(dataset!=catmapdata){ -sink(paste(dataset, "random.effects.cumulative.txt", sep="."), append=TRUE) +if(catmapobject$dataset!=catmapdata){ +sink(paste(catmapobject$dataset, "random.effects.cumulative.txt", sep="."), append=TRUE) cat("Random Effects Cumulative Meta-Analysis\n") cat(crstudy.added, cr.results, sep="\n") cat("\n") sink() } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ sink(paste("catmapdata", "random.effects.cumulative.txt", sep="."), append=TRUE) cat("Random Effects Cumulative Meta-Analysis\n") cat(crstudy.added, cr.results, sep="\n") @@ -431,90 +511,18 @@ sink() } } -ci100<-ci*100 - -#create fixed-effects sensitivity plots -if (fe.senseplot==TRUE){ -if(dataset!=catmapdata){ -pdf(file=(paste(dataset, "fixed.effects.sensitivity.plot.pdf", sep="."))) -} -if(dataset==catmapdata){ -pdf(file=(paste("catmapdata", "fixed.effects.sensitivity.plot.pdf", sep="."))) -} -sfpstudy<-c(1:nrow(a1)) -sfplx<-max((min(sfplot[,2])-0.25),0) -sfphx<-max(sfplot[,3])+0.25 -sfply<-min(sfpstudy)-0.5 -sfphy<-max(sfpstudy)+0.5 -mar1<-c(5.1, 7.1, 4.1, 2.1) -las1<-1 -par("las"=las1) -par("mar"=mar1) -sfpdummy<-c(rep(NA, length(sfpstudy))) -sfpdummy[1]<- sfphx -sfpdummy[2]<- sfplx -sfpydummy<-c(rep(NA, length(sfpstudy))) -sfpydummy[1]<- sfphy -sfpydummy[2]<- sfply -xtitle<-paste("OR (", ci100, "% CI)") -plot(sfpdummy, sfpydummy, type="n", log="x", ylab="", ylim=rev(c(sfply, sfphy)), yaxt="n", xlab=xtitle, main="Sensitivity Analysis: \n Inverse Variance (Fixed-Effects) ORs") -abline(v=1.0) -for(z in 1:nrow(a1)){ -points(sfplot[z,1],sfpstudy[z], pch=22, bg="black", col="black") -segments(sfplot[z,2],sfpstudy[z],sfplot[z,3],sfpstudy[z], bg="black", col="black") -sfpstudyname<-paste("Study Removed:",a1$name[z], sep="\n") -mtext(paste(sfpstudyname),side=2, at=sfpstudy[z], cex=0.80) -} -dev.off() -} - -#create random-effects sensitivity plots -if (re.senseplot==TRUE & tau2 > 0){ -if(dataset!=catmapdata){ -pdf(file=(paste(dataset, "random.effects.sensitivity.plot.pdf", sep="."))) -} -if(dataset==catmapdata){ -pdf(file=(paste("catmapdata", "random.effects.sensitivity.plot.pdf", sep="."))) -} -srpstudy<-c(1:nrow(a1)) -srplx<-max((min(srplot[,2])-0.25),0) -srphx<-max(srplot[,3])+0.25 -srply<-min(srpstudy)-0.5 -srphy<-max(srpstudy)+0.5 -mar1<-c(5.1, 7.1, 4.1, 2.1) -las1<-1 -par("las"=las1) -par("mar"=mar1) -srpdummy<-c(rep(NA, length(srpstudy))) -srpdummy[1]<- srphx -srpdummy[2]<- srplx -srpydummy<-c(rep(NA, length(srpstudy))) -srpydummy[1]<- srphy -srpydummy[2]<- srply -xtitle<-paste("OR (", ci100, "% CI)") -plot(srpdummy, srpydummy, type="n", log="x", ylab="", ylim=rev(c(srply, srphy)), yaxt="n", xlab=xtitle, main="Sensitivity Analysis: \n DerSimonian & Laird (Random-Effects) ORs") -abline(v=1.0) -for(y in 1:nrow(a1)){ -points(srplot[y,1],srpstudy[y], pch=22, bg="black", col="black") -segments(srplot[y,2],srpstudy[y],srplot[y,3],srpstudy[y], bg="black", col="black") -srpstudyname<-paste("Study Removed:", a1$name[y], sep="\n") -mtext(paste(srpstudyname),side=2, at=srpstudy[y], cex=0.80) -} -dev.off() -} - #create fixed-effects cumulative plots if (fe.cumplot==TRUE){ -if(dataset!=catmapdata){ -pdf(file=(paste(dataset, "fixed.effects.cumulative.plot.pdf", sep="."))) +if(catmapobject$dataset!=catmapdata){ +pdf(file=(paste(catmapobject$dataset, "fixed.effects.cumulative.plot.pdf", sep="."))) } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ pdf(file=(paste("catmapdata", "fixed.effects.cumulative.plot.pdf", sep="."))) } -cfpstudy<-c(1:nrow(a1)) +cfpstudy<-c(1:nrow(catmapobject$a1)) cfplx<-max((min(cfplot[,2])-0.25),0) cfphx<-max(cfplot[,3])+0.25 -cfply<-min(cfpstudy)-0.5 +cfply<-1-0.5 cfphy<-max(cfpstudy)+0.5 mar1<-c(5.1, 7.1, 4.1, 2.1) las1<-1 @@ -526,27 +534,27 @@ cfpdummy[2]<- cfplx cfpydummy<-c(rep(NA, length(cfpstudy))) cfpydummy[1]<- cfphy cfpydummy[2]<- cfply -xtitle<-paste("OR (", ci100, "% CI)") +xtitle<-paste("OR(", ci100, "% CI)") plot(cfpdummy, cfpydummy, type="n", log="x", ylab="", ylim=rev(c(cfply, cfphy)), yaxt="n", xlab=xtitle, main="Cumulative Meta-Analysis: \n Inverse Variance (Fixed-Effects) ORs") abline(v=1.0) -for(x in 1:nrow(a1)){ +for(x in 1:nrow(catmapobject$a1)){ points(cfplot[x,1],cfpstudy[x], pch=22, bg="black", col="black") segments(cfplot[x,2],cfpstudy[x],cfplot[x,3],cfpstudy[x], bg="black", col="black") -cfpstudyname<-paste("Study Added:", a1$name[x], sep="\n") +cfpstudyname<-paste("Study Added:", catmapobject$studyname[x], sep="\n") mtext(paste(cfpstudyname),side=2, at=cfpstudy[x], cex=0.80) } dev.off() } #create random-effects cumulative plots -if (re.cumplot==TRUE & tau2 > 0){ -if(dataset!=catmapdata){ -pdf(file=(paste(dataset, "random.effects.cumulative.plot.pdf", sep="."))) +if (re.cumplot==TRUE & catmapobject$tau2 > 0){ +if(catmapobject$dataset!=catmapdata){ +pdf(file=(paste(catmapobject$dataset, "random.effects.cumulative.plot.pdf", sep="."))) } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ pdf(file=(paste("catmapdata", "random.effects.cumulative.plot.pdf", sep="."))) } -crpstudy<-c(1:(nrow(a1)-1)) +crpstudy<-c(1:(nrow(catmapobject$a1)-1)) crplx<-max((min(crplot[,2])-0.25),0) crphx<-max(crplot[,3])+0.25 crply<-min(crpstudy)-0.5 @@ -564,75 +572,78 @@ crpydummy[2]<- crply xtitle<-paste("OR (", ci100, "% CI)") plot(crpdummy, crpydummy, type="n", log="x", ylab="", ylim=rev(c(crply, crphy)), yaxt="n", xlab=xtitle, main="Cumulative Meta-Analysis: \n DerSimonian & Laird (Random-Effects) ORs") abline(v=1.0) -for(w in 1:(nrow(a1)-1)){ +for(w in 1:(nrow(catmapobject$a1)-1)){ q<-w+1 points(crplot[w,1],crpstudy[w], pch=22, bg="black", col="black") segments(crplot[w,2],crpstudy[w],crplot[w,3],crpstudy[w], bg="black", col="black") -crpstudyname<-paste("Study Added:", a1$name[w], sep="\n") +crpstudyname<-paste("Study Added:", catmapobject$studyname[w], sep="\n") mtext(paste(crpstudyname),side=2, at=crpstudy[w], cex=0.80) } -dev.off() +#dev.off() +} } - # create fixed-effect forest plots +catmap.forest<-function(catmapobject, fe.forest, re.forest){ +ci100<- catmapobject$ci*100 if (fe.forest==TRUE){ -if(dataset!=catmapdata){ -pdf(file=(paste(dataset, "fixed.effects.plot.pdf", sep="."))) +if(catmapobject$dataset!=catmapdata){ +pdf(file=(paste(catmapobject$dataset, "fixed.effects.plot.pdf", sep="."))) } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ pdf(file=(paste("catmapdata", "fixed.effects.plot.pdf", sep="."))) } -prop.weight<-(weight/(sum(weight))*10) -OR<-c(combinedOR, exp(logOR)) -study<-1:(nrow(a1)+1) -lx<-max((min(lbci.fe)-0.25),0) -hx<-max(ubci.fe)+0.25 -ly<-min(study)-0.5 -hy<-max(study)+0.5 +prop.weight<-(catmapobject$weight/(sum(catmapobject$weight))*10) +OR<-c(catmapobject$combinedOR, exp(catmapobject$logOR)) +study<-1:(nrow(catmapobject$a1)+1) +lx<-max((min(catmapobject$lbci.fe)-0.25),0) +hx<-max(catmapobject$ubci.fe)+0.25 +ly<-(1-0.5) +hy<-(length(catmapobject$study)+ 1.5) mar1<-c(5.1, 7.1, 4.1, 2.1) las1<-1 par("las"=las1) par("mar"=mar1) -dummy<-c(rep(NA, length(study))) +dummy<-c(rep(NA, length(catmapobject$study))) dummy[1]<-hx dummy[2]<-lx -ydummy<-c(rep(NA, length(study))) +ydummy<-c(rep(NA, length(catmapobject$study))) ydummy[1]<-hy ydummy[2]<-ly -xtitle<-paste("OR (", ci100, "% CI)") +xtitle<-paste("OR(", ci100, "% CI)") plot(dummy, ydummy, type="n", log="x", ylab="", yaxt="n", xlab=xtitle, main="Inverse Variance (Fixed-Effects) ORs") -points(OR[1], study[1], pch=22, cex=1.0, bg="red", col="red") -segments(lbci, 1, ubci, 1, col="red") +points(OR[1], 1, pch=22, cex=1.0, bg="red", col="red") +segments(catmapobject$lbci, 1, catmapobject$ubci, 1, col="red") mtext("Pooled OR",side=2,at=1, cex=0.80) abline(v=1.0) -for(i in 2:(nrow(a1)+1)){ +limit<-nrow(catmapobject$a1)+1 +counts<-c(1:limit) +for(i in 2:(nrow(catmapobject$a1)+1)){ j<-i-1 -points(OR[i],study[i], pch=22, cex=prop.weight[j], bg="black", col="black") -segments(lbci.fe[j],study[i],ubci.fe[j],study[i], bg="black", col="black") -studyname<-a1$name[j] -mtext(paste(studyname),side=2, at=study[i], cex=0.80) +points(OR[i], counts[i], pch=22, cex=prop.weight[j], bg="black", col="black") +segments(catmapobject$lbci.fe[j], counts[i], catmapobject$ubci.fe[j], counts[i], bg="black", col="black") +mtext(paste(catmapobject$studyname[j]),side=2, at=counts[i], cex=0.80) } dev.off() } #create random-effects forest plots -if (re.forest==TRUE & tau2 > 0){ -if(dataset!=catmapdata){ -pdf(file=(paste(dataset, "random.effects.plot.pdf", sep="."))) +if (re.forest==TRUE & catmapobject$tau2 > 0){ +if(catmapobject$dataset!=catmapdata){ +pdf(file=(paste(catmapobject$dataset, "random.effects.plot.pdf", sep="."))) } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ pdf(file=(paste("catmapdata", "random.effects.plot.pdf", sep="."))) } -dslprop.weight<-(weight.dsl/(sum(weight.dsl))*100) -dslOR<-c(OR.dsl, exp(logOR)) -rstudy<-1:(nrow(a1)+1) -rlx<-max((min(lbci.fe)-0.25),0) -rhx<-max(ubci.fe)+0.25 -rly<-min(study)-0.5 -rhy<-max(study)+0.5 +dslprop.weight<-(catmapobject$weight.dsl/(sum(catmapobject$weight.dsl))*100) +dslOR<-c(catmapobject$OR.dsl, exp(catmapobject$logOR)) +rstudy<-1:(nrow(catmapobject$a1)+1) +rlx<-max((min(catmapobject$lbci.fe)-0.25),0) +rhx<-max(catmapobject$ubci.fe)+0.25 +rly<-(1-0.5) +rhy<-(length(catmapobject$study)+1.5) mar1<-c(5.1, 7.1, 4.1, 2.1) las1<-1 par("las"=las1) @@ -643,37 +654,41 @@ rdummy[2]<-rlx rydummy<-c(rep(NA, length(rstudy))) rydummy[1]<-rhy rydummy[2]<-rly -xtitle<-paste("OR (", ci100, "% CI)") +xtitle<-paste("OR(", ci100, "% CI)") plot(rdummy, rydummy, type="n", log="x", ylab="", yaxt="n", xlab=xtitle, main="DerSimonian & Laird (Random-Effects) ORs") -points(dslOR[1], study[1], pch=22, cex=1.0, bg="red", col="red") -segments(lbci.dsl, 1, ubci.dsl, 1, col="red") +points(dslOR[1], 1, pch=22, cex=1.0, bg="red", col="red") +segments(catmapobject$lbci.dsl, 1, catmapobject$ubci.dsl, 1, col="red") mtext("Pooled OR",side=2,at=1, cex=0.80) abline(v=1.0) -for(i in 2:(nrow(a1)+1)){ +limit<-nrow(catmapobject$a1)+1 +counts<-c(1:limit) +for(i in 2:(nrow(catmapobject$a1)+1)){ j<-i-1 -points(OR[i],study[i], pch=22, cex=prop.weight[j], bg="black", col="black") -segments(lbci.fe[j],study[i],ubci.fe[j],study[i], bg="black", col="black") -studyname<-a1$name[j] -mtext(paste(studyname),side=2, at=study[i], cex=0.80) +points(OR[i],counts[i], pch=22, cex=prop.weight[j], bg="black", col="black") +segments(catmapobject$lbci.fe[j],counts[i], catmapobject$ubci.fe[j],counts[i], bg="black", col="black") +mtext(paste(catmapobject$studyname[j]),side=2, at=counts[i], cex=0.80) +} +#dev.off() } -dev.off() } #funnel plot +catmap.funnel<-function(catmapobject, funnel){ if(funnel==TRUE){ -if(dataset!=catmapdata){ -pdf(file=(paste(dataset, "funnel.plot.pdf", sep="."))) +if(catmapobject$dataset!=catmapdata){ +pdf(file=(paste(catmapobject$dataset, "funnel.plot.pdf", sep="."))) } -if(dataset==catmapdata){ +if(catmapobject$dataset==catmapdata){ pdf(file=(paste("catmapdata", "funnel.plot.pdf", sep="."))) } -OddsRatio<-exp(logOR) -maxse<-max(seLogOR) -minse<-min(seLogOR) -plot(OddsRatio, seLogOR, ylim=rev(c(minse,maxse)),log="x") +OddsRatio<-exp(catmapobject$logOR) +fun.se<-sqrt(catmapobject$comvarlogOR) +maxse<-max(fun.se) +minse<-min(fun.se) +plot(OddsRatio, fun.se, ylim=rev(c(minse,maxse)),log="x", ylab="Standard Error Log OR") abline(v=1) -abline(v=combinedOR, lty=2) +abline(v=catmapobject$combinedOR, lty=2) #dev.off() } } diff --git a/man/catmap.Rd b/man/catmap.Rd index 25f789b..76ba4fc 100755 --- a/man/catmap.Rd +++ b/man/catmap.Rd @@ -4,46 +4,27 @@ \title{catmap: Case-control And TDT Meta-Analysis Package} \author{Kristin K. Nicodemus, \email{nicodemusk@mail.nih.gov} or \email{knicodem@jhsph.edu}} \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 Farrell (2005); the random-effects model is described in Nicodemus (submitted).} -\usage{catmap(dataset, - ci, - fe.forest, - re.forest, - printout, - fe.sense, - fe.senseplot, - re.sense, - re.senseplot, - fe.cumulative, - fe.cumplot, - re.cumulative, - re.cumplot, - funnel) } +\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 Farrell (2005); the random-effects model is described in Nicodemus (submitted). +} +\usage{catmapobject<-catmap(dataset, ci, printout) } \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 (denoted NA). See for example: data(catmapdata).)} + \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). +} \item{ci}{The confidence level for confidence intervals; 0 < ci < 1} - \item{fe.forest}{Logical. Should a postscript of the forest plot for the fixed-effects model be generated? Plots are saved to the current working directory and have the default name of \bold{dataset.fixed.effects.plot.ps} where dataset is the name of the file given as the first argument to catmap.} - \item{re.forest}{Logical. Should a postscript of the forest plot for the random-effects model be generated? Plots are saved to the current working directory and have the default name of \bold{dataset.random.effects.plot.ps} where dataset is the name of the file given as the first argument to catmap.} - \item{printout}{Logical. Should a text file of the fixed- and random-effects models, Q statistic, publication bias results be saved to the current working directory? Output files are saved with the default name of \bold{dataset.output.txt} where dataset is the name of the file given as the first argument to catmap.} - \item{fe.sense}{Logical. Should a leave-one-out sensitivity analysis be performed using fixed-effects estimates? Automatic output result files is 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; only the output option overwrites existing files.} - \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.sense}{Logical. Should a leave-one-out sensitivity analysis be performed using random-effects estimates? Automatic output result file is 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; only the output option overwrites existing files.} - \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.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}, respectively, 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; only the output option overwrites existing files.} - \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.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 names; only the output option overwrites existing files. Also note that random-effects estimates are undefined for a single study; calculations begin with the first 2 studies and 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{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.} - \item{funnel}{Logical. Should a funnel plot be produced? Funnel plots plot the log standard error of the ORs and the ORs along with a solid line at 1.0 (no effect) and a dotted line at the overall pooled OR. Used to assess publication bias. Output plot file is saved with the default name of \bold{dataset.funnel.plot.pdf} where dataset is the name of the file given as the first argument to catmap.} + \item{printout}{Logical. Should a text file of the fixed- and random-effects models and Q statistic results be saved to the current working directory? Output files are saved with the default name of \bold{dataset.output.txt} where dataset is the name of the file given as the first argument to catmap.} +} +\details{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). Cumulative meta-analyses over time and leave-one-out sensitivity analyses may be performed using either fixed- or random-effects estimates or both estimates may be calculated; both produce a .txt file and an optional .pdf plot as output. A funnel plot graphic is implemented; however, no formal test of publication bias is available (see Ioannidis & Trikalinos, 2007). \bold{Note that a catmap object must be created on the first call to catmap.} } -\details{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). Cumulative meta-analyses over time and leave-one-out sensitivity analyses may be performed using either fixed- or random-effects estimates or both estimates may be calculated; both produce a .txt file and an optional .pdf plot as output. A funnel plot graphic is implemented; however, no formal test of publication bias is available (see Ioannidis & Trikalinos, 2007).} +\seealso{ + \code{\link{catmap.forest}}, + \code{\link{catmap.sense}}, + \code{\link{catmap.cumulative}}, + \code{\link{catmap.funnel}}. +} \examples{ -data(catmapdata) -catmap(catmapdata, 0.95, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, -FALSE, FALSE, FALSE, FALSE, FALSE) \dontrun{ -catmap(catmapdata, 0.95, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, -FALSE, FALSE, FALSE, FALSE, FALSE)} -} +data(catmapdata) +catmap(catmapdata, 0.95, TRUE) +catmapobject1<-catmap(catmapdata, 0.95, TRUE)}} \keyword{methods} diff --git a/man/catmap.cumulative.Rd b/man/catmap.cumulative.Rd new file mode 100755 index 0000000..69285ac --- /dev/null +++ b/man/catmap.cumulative.Rd @@ -0,0 +1,34 @@ +\name{catmap.cumulative} +\alias{catmap.cumulative} +\title{Cumulative Meta-Analyses and Plots using either Fixed- or Random-Effects} +\author{Kristin K. Nicodemus, \email{nicodemusk@mail.nih.gov} or \email{knicodem@jhsph.edu}} +\description{ +\code{catmap.cumulative} conducts cumulative meta-analyses and creates plots of the ORs and confidence intervals using either fixed- or random-effects analyses. +} +\usage{catmap.cumulative(catmapobject, fe.cumulative, fe.cumplot, +re.cumulative, re.cumplot) } +\arguments{ + \item{catmapobject}{The catmap object created by a previous call to catmap} + \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{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.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{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. +} +\seealso{ + \code{\link{catmap}}, + \code{\link{catmap.forest}}, + \code{\link{catmap.sense}}, + \code{\link{catmap.funnel}}. +} +\examples{ +\dontrun{ +data(catmapdata) +catmapobject1<-catmap(catmapdata, 0.95, TRUE) +catmap.cumulative(catmapobject1, TRUE, TRUE, TRUE, TRUE)}} +\keyword{methods} diff --git a/man/catmap.forest.Rd b/man/catmap.forest.Rd new file mode 100755 index 0000000..9befd55 --- /dev/null +++ b/man/catmap.forest.Rd @@ -0,0 +1,28 @@ +\name{catmap.forest} +\alias{catmap.forest} +\title{Forest Plots using either Fixed- or Random-Effects Pooled ORs and CIs} +\author{Kristin K. Nicodemus, \email{nicodemusk@mail.nih.gov} or \email{knicodem@jhsph.edu}} +\description{ +\code{catmap.forest} creates forest plots of the individual study ORs and CIs and the fixed or random effects pooled OR and CI. +} +\usage{catmap.forest(catmapobject, fe.forest, re.forest) } +\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.} +} +\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. +} +\seealso{ + \code{\link{catmap}}, + \code{\link{catmap.cumulative}}, + \code{\link{catmap.sense}}, + \code{\link{catmap.funnel}}. +} +\examples{ +\dontrun{ +data(catmapdata) +catmapobject1<-catmap(catmapdata, 0.95, TRUE) +catmap.cumulative(catmapobject1, TRUE, TRUE, TRUE, TRUE)}} +\keyword{methods} diff --git a/man/catmap.funnel.Rd b/man/catmap.funnel.Rd new file mode 100755 index 0000000..64db04a --- /dev/null +++ b/man/catmap.funnel.Rd @@ -0,0 +1,26 @@ +\name{catmap.funnel} +\alias{catmap.funnel} +\title{Funnel Plots for catmap} +\author{Kristin K. Nicodemus, \email{nicodemusk@mail.nih.gov} or \email{knicodem@jhsph.edu}} +\description{ +\code{catmap.funnel} creates a funnel plot of the individual ORs against the se. +} +\usage{catmap.funnel(catmapobject, funnel) } +\arguments{ + \item{catmapobject}{The catmap object created by a previous call to catmap} + \item{funnel}{Logical. Should a funnel plot be produced? Funnel plots plot standard error of the log ORs against the ORs along with a solid line at 1.0 and a dotted line at the overall pooled OR. Used to assess publication bias. Output plot file is saved with the default name of \bold{dataset.funnel.plot.pdf} where dataset is the name of the file given as the first argument to catmap.} +} +\details{\code{catmap.funnel} creates a .pdf file of the funnel plot. +} +\seealso{ + \code{\link{catmap}}, + \code{\link{catmap.sense}}, + \code{\link{catmap.cumulative}}, + \code{\link{catmap.forest}}. +} +\examples{ +\dontrun{ +data(catmapdata) +catmapobject1<-catmap(catmapdata, 0.95, TRUE) +catmap.funnel(catmapobject1, TRUE)}} +\keyword{methods} diff --git a/man/catmap.sense.Rd b/man/catmap.sense.Rd new file mode 100755 index 0000000..455caac --- /dev/null +++ b/man/catmap.sense.Rd @@ -0,0 +1,30 @@ +\name{catmap.sense} +\alias{catmap.sense} +\title{Leave-One-Out Sensitivity Analyses and Plots using either Fixed- or Random-Effects Estimates} +\author{Kristin K. Nicodemus, \email{nicodemusk@mail.nih.gov} or \email{knicodem@jhsph.edu}} +\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. +} +\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.} +} +\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. +} +\seealso{ + \code{\link{catmap}}, + \code{\link{catmap.forest}}, + \code{\link{catmap.cumulative}}, + \code{\link{catmap.funnel}}. +} +\examples{ +\dontrun{ +data(catmapdata) +catmapobject1<-catmap(catmapdata, 0.95, TRUE) +catmap.sense(catmapobject1, TRUE, TRUE, TRUE, TRUE)}} +\keyword{methods} \ No newline at end of file diff --git a/man/catmapdata.Rd b/man/catmapdata.Rd index 808d226..278642f 100755 --- a/man/catmapdata.Rd +++ b/man/catmapdata.Rd @@ -2,14 +2,15 @@ \alias{catmapdata} \docType{data} \title{An example data frame for use with catmap} +\author{Kristin K. Nicodemus, \email{nicodemusk@mail.nih.gov} or \email{knicodem@jhsph.edu}} \description{ -A file for use with catmap containing simulated data. +A file for use with \code{catmap} containing simulated data. } \usage{data(catmapdata)} \format{ A data frame with 5 observations on the following 8 variables. \describe{ - \item{\code{name}}{a factor with study name and optionally year of publication. NOTE: if year of publication is included there must be no space between study name and year. A comma or underscore work nicely. \code{Abrams,2001} \code{Peter,2002} \code{Todd,2003} \code{Wei,2007} \code{Yu,2007}} + \item{\code{name}}{a factor with study name and optionally year of publication. NOTE: if year of publication is included there must be no space between study name and year. A comma or underscore work nicely. Example: \code{Abrams,2001} \code{Peter,2002} \code{Todd,2003} \code{Wei,2007} \code{Yu,2007}} \item{\code{study}}{a numeric vector containing 1 if study is TDT and 2 if case-control} \item{\code{t}}{a numeric vector containing counts of alleles transmitted in TDT study} \item{\code{nt}}{a numeric vector containing counts of alleles not transmitted in TDT study} @@ -22,6 +23,12 @@ A file for use with catmap containing simulated data. \details{ The header must be part of the file and either 0 or NA must be included for data not relevant for the particular study. For example, using a TDT study the caserisk, controlrisk, casenotrisk and controlnotrisk must have values of either 0 or NA. } +\seealso{ + \code{\link{catmap.forest}}, + \code{\link{catmap.sense}}, + \code{\link{catmap.cumulative}}, + \code{\link{catmap.funnel}}. +} \examples{ data(catmapdata) }