ngreifer / WeightIt

WeightIt: an R package for propensity score weighting
https://ngreifer.github.io/WeightIt/
102 stars 12 forks source link

Error when using by with super method #11

Closed frankpopham closed 4 years ago

frankpopham commented 4 years ago

Hi,

Weightit is great.

I am finding that I get "Error in family$linkfun(mustart) : Argument mu must be a nonempty numeric vector Error in algorithm SL.glm The Algorithm will be removed from the Super Learner (i.e. given weight 0) Error in (function (Y, X, newX = NULL, family = gaussian(), SL.library, : All algorithms dropped from library".

when using by option for the super method and SL.glm. It runs find without by (i.e. I run on one imputation at a time).

best wishes, Frank

ngreifer commented 4 years ago

Thank you so much! If you're using WeightIt with multiple imputation, you should take a look at the MatchThem package, which contains a wrapper for weightit for multiply imputed data. I'll take a look at what this bug is about.

ngreifer commented 4 years ago

Fixed, thank you!