Nothing
##' xBalance helper function
##'
##' Make pooled SD
##' @param zz Treatment
##' @param mm mm
##' @param pre.n pre.n
##' @return pooled SD
##' @keywords internal
xBalance.makepooledsd <- function(zz,mm,pre.n) {
if (any(zz>0)) {
s2.t <- apply(mm[(zz>0),,drop=FALSE],2,var,na.rm=TRUE)
} else {
s2.t <- 0
}
##Variance of the covariates among the controls (zz==0)
if (any(zz<=0)) {
s2.c <- apply(as.matrix(mm[(zz<=0),,drop=FALSE]), 2, var,na.rm=TRUE)
} else {
s2.c <- 0
}
##Pooled standard deviation.
sqrt( (max(sum(zz>0)-1,0)*s2.t + max(sum(zz<=0)-1,0)*s2.c)/(pre.n-2) )
}
xBalance.makepooledsd.single <- function(zz,v,pre.n) {
if (any(zz>0)) {
s2.t <- var(v[zz > 0], na.rm = TRUE)
} else {
s2.t <- 0
}
##Variance of the covariates among the controls (zz==0)
if (any(zz<=0)) {
s2.c <- var(v[zz <= 0], na.rm = TRUE)
} else {
s2.c <- 0
}
##Pooled standard deviation.
sqrt( (max(sum(zz>0)-1,0)*s2.t + max(sum(zz<=0)-1,0)*s2.c)/(pre.n-2) )
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.