A plot method for an eefAnalytics S3 object obtained from the eefAnalytics package.
A plot method for an eefAnalytics S3 object obtained from the eefAnalytics package.
Plots different figures based on output from eefAnalytics package.
## S3 method for class 'eefAnalytics'plot(x, group, Conditional =TRUE, ES_Total =TRUE, slope =FALSE,...)
Arguments
x: an output object from the eefAnalytics package.
group: a string/scalar value indicating which intervention to plot. This must be one of the values of intervention variable excluding the control group. For a two arm trial, the maximum number of values to consider is 1 and 2 for three arm trial.
Conditional: a logical value to indicate whether to plot the conditional effect size. The default is Conditional=TRUE, otherwise Conditional=FALSE should be specified for plot based on the unconditional effect size. Conditional variance is total or residual variance from a multilevel model with fixed effects, whilst unconditional variance is total variance or residual variance from a multilevel model with only intercept as fixed effect.
ES_Total: A logical value indicating whether to plot the effect size based on total variance or within school variance. The default is ES_Total=TRUE, to plot the effect size using total variance. ES_Total=FALSE should be specified for the effect size based on within school or residuals variance.
slope: A logical value indicating whether to return the plot of random intercept (default is slope=FALSE). return other school-by-intervention interaction random slope (s) is slope=TRUE. This argument is suitable only for mstBayes and mstFREQ functions.
...: arguments passed to plot.default
Returns
Returns relevant plots for each model.
Details
Plot produces a graphical visualisation depending on which model is fitted:
For srtFREQ(), plot can only be used when nBoot or nPerm is specified to visualise the distribution of bootstrapped or permutated values.
For crtFREQ() or mstFREQ(), plot shows the distribution of random intercepts when group=NULL. It produces histogram of permutated or bootstrapped values when group is specified and either nBoot or nPerm is also specified.
Examples
if(interactive()){#### read datadata(mstData)data(crtData)#################### SRT ######################### BootstrappedoutputSRTBoot <- srtFREQ(Posttest~ Intervention + Prettest, intervention ="Intervention",nBoot=1000, data = mstData)plot(outputSRTBoot,group=1)##### PermutationoutputSRTPerm <- srtFREQ(Posttest~ Intervention + Prettest, intervention ="Intervention",nPerm=1000, data = mstData)plot(outputSRTPerm,group=1)#################### MST ######################## Random interceptsoutputMST <- mstFREQ(Posttest~ Intervention + Prettest, random ="School", intervention ="Intervention", data = mstData)plot(outputMST)#### BootstrappedoutputMSTBoot <- mstFREQ(Posttest~ Intervention + Prettest, random ="School", intervention ="Intervention", nBoot =1000, data = mstData)plot(outputMSTBoot)plot(outputMSTBoot,group=1)#### PermutationoutputMSTPerm <- mstFREQ(Posttest~ Intervention + Prettest, random ="School", intervention ="Intervention", nPerm =1000, data = mstData)plot(outputMSTPerm)plot(outputMSTPerm,group=1)#################### CRT ######################## Random interceptsoutputCRT <- crtFREQ(Posttest~ Intervention + Prettest, random ="School", intervention ="Intervention", data = crtData)plot(outputCRT)## BootstrappedoutputCRTBoot <- crtFREQ(Posttest~ Intervention + Prettest, random ="School", intervention ="Intervention", nBoot =1000, data = crtData)plot(outputCRTBoot,group=1)##PermutationoutputCRTPerm <- crtFREQ(Posttest~ Intervention + Prettest, random ="School", intervention ="Intervention", nPerm =1000, data = crtData)plot(outputCRTPerm,group=1)}