
The function accepts parameter estimates and their standard errors for a range of models.
ESplot(ESdat,SE=TRUE,logscale=TRUE,alpha=0.05,xlim=c(-2,8),v=1,...)
A data frame consisting of model id, parameter estimates and standard errors or confidence limits
If TRUE, the third column of ESdata contains the standard error estimates
If TRUE, indicates log-scale as appropriate for odds ratio
Type-I error rate used to construct 100(1-alpha) confidence interval
Lower and upper limits of the horizontal axis, roughly corresponding to confidence limits
Other options for plot
Location of the vertical line
# NOT RUN {
# 7-4-2008 MRC-Epid JHZ
options(stringsAsFactors=FALSE)
testdata <- data.frame(models=c("Basic model","Adjusted","Moderately adjusted",
"Heavily adjusted","Other"),
OR = c(4.5,3.5,2.5,1.5,1),
SElogOR = c(0.2,0.1,0.5,0.5,0.2))
ESplot(testdata,v=1)
title("This is a fictitious plot")
#
# Quantitative trait, as appropriate for linear regression
# testdata <- data.frame(modelid, beta, se(beta))
# ESplot(testdata, logscale=FALSE)
#
# Other scenarios
# OR with CI
# ESplot(testdata,SE=FALSE)
# }
Run the code above in your browser using DataLab