CACE Analysis of Multisite Randomised Trials.

Description

caceMSTBoot performs CACE analysis of multisite randomised trials.

Usage

1
caceMSTBoot(formula, random, intervention, compliance, nBoot, data)

Arguments

formula

model specification of the form posttest ~ pretests+Intervention+.... 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.

random

a string variable specifying the "clustering" variable as contained in the data. This must be put between quotes. For example, "school".

intervention

the name of the intervention variable as appeared in formula. This must be put in quotes. For example "intervention" or "treatment" or "group".

compliance

percentages of sessions attended by pupils.

nBoot

number of bootstrap required to generate bootstrap confidence interval. This must be specified.

data

data frame containing the data to be analysed.

Value

S3 object; a list consisting of

  • CACE. Estimated CACE effect size based on percentages of sessions attended by pupils. The percentage data is converted into the following grids (0, 10, 20, 30, 40, 50, 60, 70, 80, 90) and CACE effect size is calculated for each grid.

  • Compliers. A summary table of the percentage of pupils in the intervention and control groups that attended more than a pre-specified percentage of sessions. The values for the control group should be zeros if there is no dilution in which a pupil or school in the control group receives intervention.

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
data(catcht)

########################################################
## MLM analysis of multisite trials + 1.96SE ##
########################################################

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


### Fixed effects
beta <- output1$Beta
beta

### Effect size
ES1 <- output1$ES$Intervention1
ES1

## Covariance matrix
covParm <- output1$covParm
covParm

### random effects for schools

randOut <- output1$"SchEffects"
randOut <- randOut[order(randOut$Estimate),]
barplot(randOut$Estimate,ylab="Deviations from Overall Average",
		names.arg=randOut$Schools,las=2)

###############################################
## MLM analysis of multisite trials          ##	 
## with bootstrap confidence intervals       ##
###############################################

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


### Effect size

ES2 <- output2$ES
ES2


#######################################################################
## MLM analysis of mutltisite trials with permutation p-value##
#######################################################################

output3 <- mstFREQ(Posttest~ Intervention+Prettest,random="School",
		intervention="Intervention",nPerm=1000,data=catcht)


#### Distribution under the null

perm <- output3$Perm
str(perm )

#### Permutation P-value using total variance


obsg <- output3$ES$Intervention1[2,1]
obsg


p_value <- ifelse(mean(perm$"Intervention1Total" > obsg)==0,"<0.001",
		mean(perm$"Intervention1Total" > obsg) )
p_value

hist(perm$"Intervention1Total", breaks=40, col="white", 
		border="blueviolet",
		xlab="Distribution Under Null Hypothesis", 
		main=paste("P(X|NULL)= ",p_value,sep=""), 
		xlim=range(c(perm$"Intervention1Total",obsg),
		na.rm=TRUE))
abline(v=obsg,lwd=2,col=4)