srtFREQ: Analysis of Simple Randomised Education Trial using Linear...

Description Usage Arguments Value Examples

View source: R/srtFreq.R

Description

srtFREQ performs analysis of educational trials under the assumption of independent errors among pupils. This can also be used with schools as fixed effects.

Usage

1
srtFREQ(formula, intervention, baseln, nBoot, nPerm, seed, data)

Arguments

formula

the model to be analysed is of the form y~x1+x2+.... Where y is the outcome variable and Xs are the independent variables.

intervention

a string variable specifying the "intervention variable" as appearing in the formula and the data. See example below.

baseln

A string variable allowing the user to specify the reference category for intervention variable. When not specified, the first level will be used as a reference.

nBoot

number of bootstraps required to generate bootstrap confidence intervals.

nPerm

number of permutations required to generate permutated p-value.

seed

seed required for bootstrapping and permutation procedure, if not provided default seed will be used.

data

data frame containing the data to be analysed.

Value

S3 object; a list consisting of

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
86
87
if(interactive()){

data(mstData)

###################################################################
## Analysis of simple randomised trials using Hedges Effect Size ##
###################################################################

output1 <- srtFREQ(Posttest~ Intervention+Prettest,
		intervention="Intervention",data=mstData )
ES1 <- output1$ES
ES1

###################################################################
## Analysis of simple randomised trials using Hedges Effect Size ## 
## with Permutation p-value                                      ##
###################################################################

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

ES2 <- output2$ES
ES2


#### plot permutated values

plot(output2, group=1)



###################################################################
## Analysis of simple randomised trials using Hedges Effect Size ##
## with non-parametric bootstrap confidence intervals            ##
###################################################################

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

ES3 <- output3$ES
ES3

### plot bootstrapped values

plot(output3, group=1)

####################################################################
## Analysis of simple randomised trials using Hedges' effect size  ##
##  with schools as fixed effects                                  ##
####################################################################

output4 <- srtFREQ(Posttest~ Intervention+Prettest+as.factor(School),
		intervention="Intervention",data=mstData )

ES4 <- output4$ES
ES4

####################################################################
## Analysis of simple randomised trials using Hedges' effect size ##
## with schools as fixed effects and with permutation p-value     ##
####################################################################

output5 <- srtFREQ(Posttest~ Intervention+Prettest+as.factor(School),
		intervention="Intervention",nPerm=1000,data=mstData )

ES5 <- output5$ES
ES5

#### plot permutated values

plot(output5, group=1)

####################################################################
## Analysis of simple randomised trials using Hedges' effect size ##
## with schools as fixed effects and with permutation p-value      ##
####################################################################

output6 <- srtFREQ(Posttest~ Intervention+Prettest+as.factor(School),
		intervention="Intervention",nBoot=1000,data=mstData)

ES6 <- output6$ES
ES6 

### plot bootstrapped values

plot(output6, group=1)
}

germaine86/eefAnalytics_v10 documentation built on Feb. 20, 2021, 12:13 a.m.