Skip to content
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

Multiple-trial binomial mediator: an inconsistency? #59

Open
vbrazao opened this issue Aug 8, 2023 · 0 comments
Open

Multiple-trial binomial mediator: an inconsistency? #59

vbrazao opened this issue Aug 8, 2023 · 0 comments

Comments

@vbrazao
Copy link

vbrazao commented Aug 8, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant