modelbased icon indicating copy to clipboard operation
modelbased copied to clipboard

Estimate_expectation, Error: Predictions and standard errors are not of the same length. Please specify the `data` argument.

Open ManuelSpinola opened this issue 1 year ago • 5 comments

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.

ManuelSpinola avatar Sep 25 '24 00:09 ManuelSpinola

Can you provide a reproducible example ?

bwiernik avatar Sep 25 '24 10:09 bwiernik

Unfortunately, I can't reproduce the error with other dataset, like for example, mtcars.

ManuelSpinola avatar Sep 25 '24 13:09 ManuelSpinola

My newdata has NA, is that a problem?

ManuelSpinola avatar Sep 25 '24 13:09 ManuelSpinola

Possibly, but it's very hard to diagnose an issue like this without having a reproducible example

bwiernik avatar Sep 25 '24 16:09 bwiernik

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.

ManuelSpinola avatar Sep 25 '24 17:09 ManuelSpinola

Closing for now. Please re-open if you still face problems (we'll have a major update soon, maybe that resolves this issue anyway)

strengejacke avatar Jan 19 '25 16:01 strengejacke