psw.spec.test: Propensity score model specification test

Description Usage Arguments Details Value See Also Examples

Description

psw.spec.test is used to test the sufficiency of propensity score model in balancing covariates between groups.

Usage

1
psw.spec.test(data, form.ps, weight, V.name, trans.type, K = 4)

Arguments

data

data frame to be used.

form.ps

propensity score model.

weight

weighting method to be used. Available methods are "ATE", "ATT", "ATC", "MW", and "TRAPEZOIDAL". Note that specification test is not available for weight = "OVERLAP".

V.name

a vector of covariates on which the specification test is performed.

trans.type

a vector of the same length as V.name that specifies the transformation type for each element in V.name. Available transformations are "identity", "log", "logit", "sqrt", and "Fisher". No transformation is perfomred with "identity".

K

value of K in ω(e_i) = min(1, K min(e_i, 1-e_i)) for "TRAPEZOIDAL" weight. K=4 by default.

Details

In the data set, treatment indicator should be numerically specified such that a value of 1 indicates the treated and a value of 0 indicates the control. The null hypothesis is that the propensity score model is correctly specified; the alternative is that the propensity score model is misspecified. Therefore, this test is a goodness-of-fit test of propensity score model, with the test statistic being a metric of covariate balance. #' Rejection of the specification test implies current propensity score model is inadquate for balancing covariates between groups.

Value

A list of model specification test results.

weight

weighting method.

ps.model

object returned by fitting the propensity score model using glm with "binomial" family.

ps.hat

estimated propensity score.

W

estimated propensity score weight.

V.name

covariates in the specification test.

g.B1.hat

a vector of transformed weighted average for covariates in the treated group when spec.test=T.

g.B0.hat

a vector of transformed weighted average for covariates in the control group when spec.test=T.

B.hat

difference between eta.B1.hat and eta.B0.hat when spec.test=T.

var.B.hat

covariance matrix for B.hat when spec.test=T.

test.stat

test statistic for the specification test, which follows the χ^2_{df} distribution under the null, available when spec.test=T.

df

degree of freedom for the specification test, df=rank(var.B.hat), available when spec.test=T.

pvalue

pvalue of the specification test when spec.test=T.

See Also

psw, psw.balance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Load the test data set
data(test_data);
# Propensity score model
form.ps <- "Z ~ X1 + X2 + X3 + X4";
# A vector of covariates
V.name <- c( "X1", "X2", "X3", "X4" );
# A vector of transformation types for covariates in V.name.
trans.type <- c( "identity", "identity", "logit", "logit" );
tmp <- psw.spec.test( data = test_data, form.ps = form.ps,
weight = "MW", V.name = V.name, trans.type = trans.type );

PSW documentation built on May 2, 2019, 6:01 a.m.

Related to psw.spec.test in PSW...