# srtFREQ: Analysis of Simple Randomised Trial (SRT). In eefMLM: Analytical Package for Analysing Education Trials

## Description

`srtFREQ` perfoms analysis of education trials under the assumption of independent errors between pupils. This can also be used with schools as fixed effects.

## Usage

 `1` ```srtFREQ(formula, intervention, nBoot = NULL, nPerm = NULL, data) ```

## Arguments

 `formula` specifies the model to be analysed. It is of the form y~x1+x2+..., where y is the outcome variable and X's are the predictors. `intervention` the name of the intervention variable as appeared in formula. This must be put in quotes. For example "intervention" or "treatment" or "group". `nBoot` number of bootstrap required to generate bootstrap confidence interval. Default is NULL. `nPerm` number of permutations required to generate permutation p-value. Default is NULL. `data` data frame containing the data to be analysed.

## Value

S3 `mcpi` object; a list consisting of

• `Beta`. Estimates and confidence intervals for the predictors specified in the model. It will be the slope for a continuous predictor and the mean difference for a dummy variable or a categorical predictor.

• `ES`. Hedges' effect size for the intervention effect. If `nBoot` is not specified, the confidence intervals are classical 95 If `nBoot` is specified, they are non-parametric bootstrapped confidence intervals.

• `sigma2`. Residual variance. Its square root will generate a pooled standard deviation.

• `Perm`. A vector containing the distribution of effect size under the null hypothesis. It is produced only if `nPerm` is specified.

## Examples

 ``` 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85``` ```data(catcht) ################################################################### ## Analysis of simple randomised trials using Hedges Effect Size ## ################################################################### output1 <- srtFREQ(Posttest~ Intervention+Prettest, intervention="Intervention",data=catcht ) ES1 <- output1\$ES ################################################################### ## Analysis of simple randomised trials using Hedges Effect Size ## ## with Permutation p-value ## ################################################################### output2 <- srtFREQ(Posttest~ Intervention+Prettest, intervention="Intervention",nPerm=1000,data=catcht ) ES2 <- output2\$ES #### Distribution under the null perm <- output2\$Perm #### Permutation P-value using total variance obsg <- output2\$ES[1] permPvalue <- ifelse(mean(perm\$permES> obsg[1])==0,"<0.001", mean(perm\$permES > obsg[1]) ) permPvalue ## Distribution of ES under H0 hist(perm\$permES, breaks=40, col="white", border="blueviolet", xlab="Distribution Under Null Hypothesis", main=paste("P(X|NULL)= ",permPvalue,sep=""), xlim=range(c(perm[,1],obsg),na.rm=TRUE)); abline(v=obsg[1],lwd=2,col=4) ################################################################### ## Analysis of simple randomised trials using Hedges Effect Size ## ## with non-parametric bootstrap CI ## ################################################################### output3 <- srtFREQ(Posttest~ Intervention+Prettest, intervention="Intervention",nBoot=1000,data=catcht) ES3 <- output3\$ES #################################################################### ## Analysis of simple randomised trials using Hedges Effect Size. ## ## Schools as fixed effects ## #################################################################### output4 <- srtFREQ(Posttest~ Intervention+Prettest+as.factor(School), intervention="Intervention",data=catcht ) ES4 <- output4\$ES ################################################################### ## Analysis of simple randomised trials using Hedges Effect Size ## ## with Permutation p-value. Schools as fixed effects ## ################################################################### output5 <- srtFREQ(Posttest~ Intervention+Prettest, intervention="Intervention",nPerm=1000,data=catcht ) ES5 <- output5\$ES ES5 #################################################################### ## Analysis of simple randomised trials using Hedges Effect Size ## ## with non-parametric bootstrap CI. Schools as fixed effects ## #################################################################### output6 <- srtFREQ(Posttest~ Intervention+Prettest, intervention="Intervention",nBoot=1000,data=catcht) ES6 <- output6\$ES ES6 ```

eefMLM documentation built on May 31, 2017, 3:50 a.m.