0

I am trying to fit a quasibinomial logistic model in R (8 predictor variables). I used multiple imputation with the mice package, 5 iterations. I have analytic weights that I am integrating the the regression model as well. I wanted to calculate McFadden's Peudo-R^2 in these circumstances, but I wasn't sure how to go about this, since the model is both pooled and weighted.

Here is the code for the imputation. imp <- mice(data, maxit = 5, predictorMatrix = predM, method = meth, print = TRUE) data_imputed <- complete(data, action="long", include = TRUE) data_imputed <- as.mids(data_imputed) Here is the code for my model. I have two continuous predictors, four binary predictors, and two categorical predictors. The analytic weights are non-integers and are preprovided in the dateset I'm working with. model <- with(data_imputed, glm(Y ~ X1 + X2 + X3 + X4 + X5 + X6 + X7 + X8, weights = wt, family = quasibinomial(link = "logit"))) I tried using the pscl package with the pR2(), without success. The mice package also has a pool.r.squared() function, but it's only for linear regressions and doesn't give any pseudo-R^2. As I am not the most familiar with quasibinomial logistic regressions (I am fitting one because the standard logistic regression can't handle non-integer weights to my understanding), perhaps the McFadden pseudo-R2 isn't even good to compute. Any enlightenment is appreciated.

awastus
  • 11
  • 2
  • Can you make your post [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) and provide some (real or fake) data to work with? Also, there used to be a user-created function for McFadden's r^2 but it looks like it's been taken down. [Here's a link to semi-related answer that includes the raw function](https://stackoverflow.com/a/74536829/14992857), but I admit I'm not sure how well it would work for pooled *and* weighted models. – jrcalabrese Jan 24 '23 at 03:16

0 Answers0