Estimate_expectation, Error: Predictions and standard errors are not of the same length. Please specify the `data` argument.
When I try estimate_expectation I got the following error:
m1_predict <- estimate_expectation(m1, data = rec_hex_6_03_df, type = "response")
Error: Predictions and standard errors are not of the same
length. Please specify the data argument.
Can you provide a reproducible example ?
Unfortunately, I can't reproduce the error with other dataset, like for example, mtcars.
My newdata has NA, is that a problem?
Possibly, but it's very hard to diagnose an issue like this without having a reproducible example
Thank you very much. I tried with data without NA and it works. Just to add information, I tried with the data with NA with predictions (marginaleeffects) and predict.glm (stats) and it works.
Closing for now. Please re-open if you still face problems (we'll have a major update soon, maybe that resolves this issue anyway)