If this conversation isn't appropriate to Github issues, please let me know. I thought it would be interesting to open a conversation about the best way to approach retrieving average marginal effects in conjunction with the mice() logic.
My first intuition is to return AMEs before pooling...
m1 <- with(imputed_df, margins(lm(y ~ x1 * x2)))
...since a "margins" object works with tidy(), which pool() requires. However, it seems like pool() is missing some information from margins objects.
pool(m1)Warning in get.dfcom(object, dfcom) : Infinite sample size assumed.
The other is to return the average marginal effects of estimates after they are pooled and stored in a mipo object. This seems though since functions like margins() don't expect a mice() object.
I posted this question to stackoverflow, which contains a reproducible example.
If this conversation isn't appropriate to Github issues, please let me know. I thought it would be interesting to open a conversation about the best way to approach retrieving average marginal effects in conjunction with the mice() logic.
My first intuition is to return AMEs before pooling...
m1 <- with(imputed_df, margins(lm(y ~ x1 * x2)))
...since a "margins" object works with tidy(), which pool() requires. However, it seems like pool() is missing some information from margins objects.
pool(m1)
Warning in get.dfcom(object, dfcom) : Infinite sample size assumed.
The other is to return the average marginal effects of estimates after they are pooled and stored in a mipo object. This seems though since functions like margins() don't expect a mice() object.
What are your thoughts on this issue?