Learn R Programming

PSAboot (version 1.3.6)

balance: Returns a summary of the balance for all bootstrap samples.

Description

This method provides some crude overall measures of balance.

Usage

balance(psaboot, na.rm = TRUE, pool.fun = mean)

Value

a list with three elements:

unadjusted

named numeric vector with unadjusted effect size before adjustment for each covariate

complete

a matrix with adjusted effect size for each covariate (columns) for each method (rows).

pooled

a matrix with mean adjusted effect size for all covariates for each method (columns) and each bootstrap sample (rows).

balances

a list with an M x n covariates matrix for each method.

Arguments

psaboot

results from PSAboot.

na.rm

should NAs be removed. NAs generally occur when there is insufficient sample for a particular covariate or an unused level.

pool.fun

a function specifying how the effect sizes across all covariates should be combined. Possible values include mean (default), q25, q75, median, max, or any function that takes a vector of numeric values.

Examples

Run this code
# \donttest{
library(PSAboot)
data(pisa.psa.cols)
data(pisausa)
bm.usa <- PSAboot(Tr = as.integer(pisausa$PUBPRIV) - 1,
    Y = pisausa$Math,
    X = pisausa[,pisa.psa.cols],
    control.ratio = 5, M = 100, seed = 2112)
bm.usa.bal <- balance(bm.usa)

# }

Run the code above in your browser using DataLab