caceSRTBoot: CACE Analysis of Simple Randomised Education Trials.

Description Usage Arguments Value Examples

View source: R/eefAnalytics_03_2017.r

Description

caceSRTBoot performs exploraty CACE analysis of simple randomised education trials.

Usage

1
caceSRTBoot(formula, 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.

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 non-parametric bootstraps. Default is NULL.

data

data frame containing the data to be analysed.

Value

S3 mcpi object; a list consisting of

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
if(interactive()){

data(mstData)
############# weighted ITT ####################################
caceOutput3<- caceSRTBoot(Posttest~ Prettest+ Intervention,
			intervention="Intervention",
			compliance = "Percentage_Attendance",nBoot=1000,data=mstData)

cace <- caceOutput3$CACE
cace

Complier <- caceOutput3$Compliers
Complier 

### visualising CACE effect size

plot(caceOutput3)
}

Example output

Warning message:
no DISPLAY variable so Tk is not available 

eefAnalytics documentation built on May 31, 2017, 4:17 a.m.