-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difficulty fitting weights to glm model #61
Comments
That's a problem! The first warning means that you have near-perfect separation in your data, i.e., a variable or combination thereof perfectly predicts treatment. You should use a different method, such as bias-reduced logistic regression ( The second error, which is more problematic, is a bug in Thanks, and sorry for the confusion it might have caused. |
Thanks very much for getting back to me so quickly, the warning does make sense given the data I am looking - I am a UK surgical academic working with a relatively small real patient dataset. Would it be possible to liaise over email? I am contactable at [email protected] |
Hi Charlie, Thank you so much for your assistance over email. Here is the problem. There is nothing wrong with the weighting model, and I was incorrect in assuming the problem was due to perfect separation of the treatment by the covariates. That said, you have fundamental imbalance in your covariates that cannot be rectified using weighting. Your groups are too small and there is not enough overlap between to make a valid inference on the ATT. One option is to change to a different estimand, like the ATO. This issue was with your outcome model. There was indeed a bug in Noah |
Hi there,
Thank you for making this great package - I am an R novice keen on using IPTW to weight logistical regression analysis, and have made progress much more quickly than I thought I would with WeightIt.
I have had some difficulty fitting my weights into a glm, it works with just two confounding variables, but when I add a third I get the error below which I have not been able to solve:
Warning: (from
glm()
) simpleWarning: glm.fit: fitted probabilities numerically 0 or 1 occurredError in Xtreat %*% Btreat : non-conformable arguments
Thanks for any help you can give.
BW,
Charlie
The text was updated successfully, but these errors were encountered: