Hongwei Dong
2019-Feb-10 17:31 UTC
[R] evaluate model performance when using 'withReplicates' in 'survey' package
Dear all,
I am using the 'withReplicates' function in the 'survey' package
to estimate a zero-inflated Poisson model. The 'withReplicates' function
gives me the coefficients, but no model performance indicators (e.g. log
likelihood, pseudo R-squared, etc). Is there a way that I can evaluate the
goodness-of-fit of a model when using 'withReplicates'?
My code looks like this:
zip_model<-withReplicates(design=mydesign, scale.weights=TRUE, quote(
coef(zeroinfl(Y ~ X1 + X2 +
X3 | X1 + X2, weights=.weights))
))
zip_model
I am aware that the 'fit.svyglm' function in the 'poliscidata'
package can calculate R-squared for models that are estimated via
'svyglm'. Unfortunately, the 'svyglm' function estimates regular
Poisson models only and cannot handle zero-inflated Poisson models.
Any advice is appreciated.
Best
Gary
[[alternative HTML version deleted]]