Andrew Kemp
2013-Oct-03 22:07 UTC
[R] How to obtain "doubly robust" means and SEs for different levels of a factor in R?
Hi all, I am using svyglm and svyttest to weight my outcome with propensity scores as per: Ridgeway & colleagues (2013) "Toolkit for Weighting and Analysis of Nonequivalent Groups: A tutorial for the twang package" So after:>glm1 <- svyglm(X ~ Y, design=design.ps) >summary(glm1)or>svyttest(X ~ Y, design=design.ps)(where X is my dependent variable and Y, my factor), I obtain my means using:>svyby(~X, ~ Y, svymean, design=design.ps, na.rm=TRUE)I also determine "doubly robust" estimates to control for covariates that remain unbalanced after propensity score weighting using:>glm1 <- svyglm(X ~ Y + a + b + c, design=design.ps) >summary(glm1)or>svyttest(X ~ Y + a + b + c, design=design.ps)(where a, b and c are my covariates). My question is how to obtain adjusted means and standard errors relating to my new model. The use of:>svyby(X ~ Y + a + b + c, svymean, design=design.ps)is extremely inefficient (and I am yet to obtain an estimate). Many thanks, Andrew Kemp University of Sao Paulo [[alternative HTML version deleted]]