You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running two mediations on the same data, once using prior (sampling) weights when fitting the models (through the survey package), and once without those prior weights (just using the glm() function). My outcome is binary. My mediator is a proportion out of 3, so I also pass 3 as the weights argument (or rather, the name of a column that is equal to 3 for every subject). When using the models fit with survey:svyglm() inside mediate(), there is no issue; however, when using the glm() models, mediate() complains that "weights on outcome and mediator models not identical".
After checking the documentation, I see that you're not supposed to use a multiple-trial binomial mediator, as that is not implemented yet. My question is, why does it work when the models are fit through survey::svyglm()? And can I trust those results at all?
The text was updated successfully, but these errors were encountered:
I'm running two mediations on the same data, once using prior (sampling) weights when fitting the models (through the
survey
package), and once without those prior weights (just using theglm()
function). My outcome is binary. My mediator is a proportion out of 3, so I also pass 3 as the weights argument (or rather, the name of a column that is equal to 3 for every subject). When using the models fit withsurvey:svyglm()
insidemediate()
, there is no issue; however, when using theglm()
models,mediate()
complains that "weights on outcome and mediator models not identical".After checking the documentation, I see that you're not supposed to use a multiple-trial binomial mediator, as that is not implemented yet. My question is, why does it work when the models are fit through survey::svyglm()? And can I trust those results at all?
The text was updated successfully, but these errors were encountered: