mlpsa: This function will perform phase II of the multilevel...

Description Usage Arguments Details Value See Also Examples

Description

TODO: Need more details

Usage

1
2
mlpsa(response, treatment = NULL, strata = NULL, level2 = NULL,
  minN = 5, reverse = FALSE, ci.level = 0.05)

Arguments

response

vector containing the response values

treatment

vector containing the treatment conditions

strata

vector containing the strata for each response

level2

vector containing the level 2 specifications

minN

the minimum number of subjects per strata for that strata to be included in the analysis.

reverse

reverse the order of treatment and control for the difference calculation.

ci.level

the confidence level to use for confidence intervals. Defaults to a 95% confidence level.

Details

The ci.adjust provides a Bonferroni-Sidak adjusted confidence intervals based on the number of levels/clusters.

Value

a mlpsa class

See Also

mlpsa.ctree mlpsa.logistic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
require(multilevelPSA)
require(party)
data(pisana)
data(pisa.colnames)
data(pisa.psa.cols)
mlctree = mlpsa.ctree(pisana[,c('CNT','PUBPRIV',pisa.psa.cols)], formula=PUBPRIV ~ ., level2='CNT')
student.party = getStrata(mlctree, pisana, level2='CNT')
student.party$mathscore = apply(student.party[,paste0('PV', 1:5, 'MATH')], 1, sum) / 5
results.psa.math = mlpsa(response=student.party$mathscore, 
       treatment=student.party$PUBPRIV, 
       strata=student.party$strata, 
       level2=student.party$CNT, minN=5)
results.psa.math
summary(results.psa.math)

## End(Not run)

multilevelPSA documentation built on May 1, 2019, 9:19 p.m.