calpara | R Documentation |
This function calculates the parameters needed for the method to calculate sample size references.
calpara(data)
data |
A data frame containing the relevant variables. The names for the variables should be “Z” for the treatment assignment, “Y” for the treatment outcome, “A” for the treatment assignment mechanism, and “id” for the cluster ID. The variable for the cluster ID should be a factor. |
A list of class calpara
which contains the following item:
sigmaw |
The within-cluster variance of the potential outcomes, with the assumption that the all of the variances the same. |
sigmab |
The between-cluster variance of the potential outcomes, with the assumption that all of the variances are the same. |
r |
The intraclass correlation coefficient with respect to the potential outcomes. |
sigma.tot |
The total variance of the potential outcomes. |
n.avg |
The mean of the number of treated observations by cluster. |
Kosuke Imai, Department of Statistics, Harvard University imai@harvard.edu, https://imai.fas.harvard.edu/; Zhichao Jiang, School of Public Health and Health Sciences, University of Massachusetts Amherst zhichaojiang@umass.edu; Karissa Huang, Department of Statistics, Harvard College krhuang@college.harvard.edu
Zhichao Jiang, Kosuke Imai (2020). “Statistical Inference and Power Analysis for Direct and Spillover Effects in Two-Stage Randomized Experiments”, Technical Report.
data(jd) data_LTFC <- data.frame(jd$assigned, jd$pct0, jd$cdd6m, jd$anonale) colnames(data_LTFC) <- c("Z", "A", "Y", "id") var.LTFC <- calpara(data_LTFC)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.