covimbal: Evaluate covariate imbalance using R-squared.

Description Usage Arguments Value Author(s) References Examples

Description

Evaluate imbalance in the covariates from the allocation by finding R-squared for a centered regression through the origin.

Usage

1
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

1
2
3
4
5
alloc <- rbinom(60,1,.5)
xmat <- matrix(rbinom(240,1,.4),ncol=4)
xmatc <- scale(xmat,center=TRUE,scale=FALSE) 

covimbal(alloc,xmatc)

SeqAlloc documentation built on May 2, 2019, 3:14 p.m.