covimbal {SeqAlloc} | R Documentation |
Evaluate covariate imbalance using R-squared.
Description
Evaluate imbalance in the covariates from the allocation by finding R-squared for a centered regression through the origin.
Usage
covimbal(y, xmatc)
Arguments
y |
vector of 0's and 1's representing allocation |
xmatc |
centered X matrix |
Value
Value of R-squared from centered regression
Author(s)
Xiaoshu Zhu xiaoshuzhu@westat.com and Sharon Lohr
References
Lohr, S. and X. Zhu (2015). Randomized Sequential Individual Assignment in Social Experiments: Evaluating the Design Options Prospectively. Sociological Methods and Research. [Advance online publication: December 27, 2015] doi: 10.1177/0049124115621332.
Examples
alloc <- rbinom(60,1,.5)
xmat <- matrix(rbinom(240,1,.4),ncol=4)
xmatc <- scale(xmat,center=TRUE,scale=FALSE)
covimbal(alloc,xmatc)
[Package SeqAlloc version 1.0 Index]