calpara {RCT2} | R Documentation |
Sample size parameter calculations for detecting a specific alternative
Description
This function calculates the parameters needed for the method to calculate sample size references.
Usage
calpara(data)
Arguments
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. |
Value
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. |
Author(s)
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
References
Zhichao Jiang, Kosuke Imai (2020). “Statistical Inference and Power Analysis for Direct and Spillover Effects in Two-Stage Randomized Experiments”, Technical Report.
Examples
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)