gap (version 1.1-22)

ESplot: Effect-size plot

Description

The function accepts parameter estimates and their standard errors for a range of models.

Usage

ESplot(ESdat,SE=TRUE,logscale=TRUE,alpha=0.05,xlim=c(-2,8),v=1,...)

Arguments

ESdat

A data frame consisting of model id, parameter estimates and standard errors or confidence limits

SE

If TRUE, the third column of ESdata contains the standard error estimates

logscale

If TRUE, indicates log-scale as appropriate for odds ratio

alpha

Type-I error rate used to construct 100(1-alpha) confidence interval

xlim

Lower and upper limits of the horizontal axis, roughly corresponding to confidence limits

Other options for plot

v

Location of the vertical line

Examples

Run this code
# 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 DataCamp Workspace