Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

desc.wts

Diagnosis of weights


Description

desc.wts assesses the quality of a set of weights on balancing a treatment and control group.

Usage

desc.wts(data, 
         w, 
         sampw = sampw,
         vars = NULL, 
         treat.var, 
         tp, 
         na.action = "level",
         perm.test.iters=0,
         verbose=TRUE,
         alerts.stack,
         estimand, multinom = FALSE, fillNAs = FALSE)

Arguments

data

a data frame containing the dataset

w

a vector of weights equal to nrow(data)

sampw

sampling weights, if provided

vars

a vector of variable names corresponding to data

treat.var

the name of the treatment variable

tp

a title for the method “type" used to create the weights, used to label the results

na.action

a string indicating the method for handling missing data

perm.test.iters

an non-negative integer giving the number of iterations of the permutation test for the KS statistic. If perm.test.iters=0 then the function returns an analytic approximation to the p-value. This argument is ignored is x is a ps object. Setting perm.test.iters=200 will yield precision to within 3% if the true p-value is 0.05. Use perm.test.iters=500 to be within 2%

verbose

if TRUE, lots of information will be printed to monitor the the progress of the fitting

alerts.stack

an object for collecting warnings issued during the analyses

estimand

the estimand of interest: either "ATT" or "ATE"

multinom

Indicator that weights are from a propsensity score analysis with 3 or more treatment groups.

fillNAs

If TRUE fills NAs with zeros.

Details

desc.wts calls bal.stat to assess covariate balance. If perm.test.iters>0 it will call bal.stat multiple times to compute Monte Carlo p-values for the KS statistics and the maximum KS statistic. It assembles the results into a list object, which usually becomes the desc component of ps objects that ps returns.

Value

See the description of the desc component of the ps object that ps returns

See Also


twang

Toolkit for Weighting and Analysis of Nonequivalent Groups

v2.0
GPL-3 | file LICENSE
Authors
Matthew Cefalu <Matthew_Cefalu@rand.org>, Greg Ridgeway, Dan McCaffrey, Andrew Morral, Beth Ann Griffin, and Lane Burgette
Initial release
2021-03-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.