ks.stat {twang}R Documentation

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

The weights be passed to these functions with any of the first three 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 ps
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

Details

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

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

See Also

stop.methods


[Package twang version 1.0-1 Index]