Learn R Programming

eefAnalytics (version 1.0.6)

ComparePlot: A plot function to compare diferent eefAnalytics S3 objects from the eefAnalytics package.

Description

A forest plot comparing the different eefAnalytics results.

Usage

ComparePlot(eefAnalyticsList, group = NULL, modelNames = NULL)

Arguments

eefAnalyticsList
A list of eefAnalytics S3 objects from eefAnalytics package.
group
a value indicating which intervention to plot. This must not be greater than the number of intervention excluding the control group. For a two arm trial, the maximum value is 1 and a maximum value of 2 for three arm trial.
modelNames
a string factor containing the names of model to compare

Value

Returns a forest plot to compare the different models

Details

ComparePlot produces a forest plot which compares the effect size and the associated confidence interval from the different model. For a multilevel model, it shows effect size based on residual variance and total variance.

Examples

Run this code
if(interactive()){

data(mstData)
###############
##### SRT #####
###############

outputSRT <- srtFREQ(Posttest~ Intervention + Prettest,
                     intervention = "Intervention", data = mstData)

outputSRTBoot <- srtFREQ(Posttest~ Intervention + Prettest,
                         intervention = "Intervention",nBoot=1000, data = mstData)

###############
##### MST #####
###############

outputMST <- mstFREQ(Posttest~ Intervention + Prettest, 
                     random = "School", intervention = "Intervention", data = mstData)

outputMSTBoot <- mstFREQ(Posttest~ Intervention + Prettest, 
                         random = "School", intervention = "Intervention", 
                         nBoot = 1000, data = mstData)

##################
##### Bayesian #####
##################

outputMSTbayes <- mlmBayes(Posttest~ Intervention + Prettest, 
                           random = "School", intervention = "Intervention",
                           nSim = 10000, data = mstData)


## comparing different results

ComparePlot(list(outputSRT,outputSRTBoot,outputMST,outputMSTBoot,outputMSTbayes),
            modelNames =c("ols", "olsBoot","MLM","MLMBoot","MLMBayes"),group=1)


}

Run the code above in your browser using DataLab