caceCRTBoot: CACE Analysis of Cluster Randomised Trials using MLM.

Description Usage Arguments Value Examples

View source: R/eefAnalyticPerm_modified_05_02_2016.R

Description

caceCRTBoot performs CACE analysis of cluster randomised trials.

Usage

1
caceCRTBoot(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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(iwq)
############# CRT
caceOutput<- caceCRTBoot(Posttest~ Prettest+ Intervention,
			random="School",intervention="Intervention",
			compliance = "Percentage_Attendance",
			nBoot=1000,data=iwq)

### visualising CACE ES

require(metafor)
forest(x=caceOutput$CACE$ES, ci.lb=caceOutput$CACE$LB, 
		ci.ub=caceOutput$CACE$UB, xlab="CACE ES",
		slab=as.character(caceOutput$CACE$Compliance), 
		xlim=c(-1,2), alim=c(-1,3.75), cex=1,lwd=1.5)

eefMLM documentation built on May 2, 2019, 5:46 p.m.

Related to caceCRTBoot in eefMLM...