Description Usage Arguments Details Value Examples
View source: R/plotfunctions.R
A forest plot comparing the different eefAnalytics results.
1 | ComparePlot(eefAnalyticsList, group = NULL, modelNames = NULL)
|
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 |
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.
Returns a forest plot to compare the different models
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.