Learn R Programming

eefAnalytics (version 1.0.6)

caceCRTBoot: Complier Average Causal Effect (CACE) Analysis of Cluster Randomised Education Trials using Multilevel Model.

Description

caceCRTBoot performs exploratoty CACE analysis of cluster randomised education trials.

Usage

caceCRTBoot(formula, random, intervention, compliance, nBoot, data)

Arguments

formula
the model to be analysed. It is of the form y ~ x1+x2+.... Where y is the outcome variable and Xs are the predictors.
random
a string variable specifying the "clustering variable" as contained in the data. See example below
intervention
a string variable specifying the "intervention variable" as appeared in the formula. See example below
compliance
a string variable specifying the "compliance variable" as contained in the data. The data must be in percentages ranging from 0 - 100.
nBoot
number of bootstraps required to generate bootstrap confidence interval. Default is NULL.
data
data frame containing the data to be analysed.

Value

S3 object; a list consisting of
  • CACE. Estimates of CACE adjusted effect sizes based on pre-specified thresholds. Only produced for threshold with at least 50
  • Compliers. Percentage of pupils that achieved a pre-specified threshold of compliance.

Examples

Run this code
if(interactive()){

data(crtData)

######################## weighted ITT ##############################################
caceOutput<- caceCRTBoot(Posttest~ Prettest+ Intervention,
			random="School",intervention="Intervention",
			compliance = "Percentage_Attendance",nBoot=1000,data=crtData)

cace <- caceOutput$CACE
cace

Complier <- caceOutput$Compliers
Complier 

### visualising CACE effect size

plot(caceOutput)
}

Run the code above in your browser using DataLab