Learn R Programming

twang (version 0.6-1)

ks.stat: Functions for evaluating balance

Description

These are a collection of functions that can be used as components of stop.methods for evaluating the balance of two groups

Usage

ks.stat(logw = NULL, w.ctrl = NULL, 
        gbm1 = NULL, i = 1, data, 
        sampw = rep(1, nrow(data)), 
        rule.summary = mean, na.action = "level", 
        vars, treat.var, collapse.by.var = FALSE, 
        verbose = FALSE)

es.stat(logw = NULL, w.ctrl = NULL, 
        gbm1 = NULL, i = 1, data, 
        sampw = rep(1, nrow(data)), 
        rule.summary = mean, na.action = "level", 
        vars, treat.var, collapse.by.var = FALSE, 
        verbose = FALSE)

strata.stat(logw = NULL, w.ctrl = NULL, 
            gbm1 = NULL, i = 1, data, 
            sampw = rep(1, nrow(data)), 
            rule.summary = mean, na.action = "level", 
            vars, treat.var, collapse.by.var = FALSE, 
            verbose = FALSE)

Arguments

logw
the logarithm of the weights
w.ctrl
the weights for the control subjects
gbm1
a gbm.object used for estimating the propensity scores, usually the gbm component of a ps object returned from
i
the iteration of gbm with which to compute the weights
data
a data frame with the data
sampw
optional sampling weights
rule.summary
a function for summarizing the total balance. Used to collapse statistics across all the covariates. Examples include mean and max
na.action
a string indicating the method for handling missing data
vars
a vector of variable names corresponding to data
treat.var
the name of the treatment variable
collapse.by.var
if TRUE, then statistics computed for factors are collapsed across the levels
verbose
if TRUE, lots of information will be printed to monitor the the progress of the fitting

Value

  • ~Describe the value returned If it is a LIST, use
  • comp1Description of 'comp1'
  • comp2Description of 'comp2'
  • ...

Details

~~ If necessary, more details than the description above ~~

See Also

stop.methods