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

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

Open
ManuelSpinola opened this issue Sep 25, 2024 · 5 comments

Comments

@ManuelSpinola
Copy link

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.

@bwiernik
Copy link
Contributor

Can you provide a reproducible example ?

@ManuelSpinola
Copy link
Author

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

@ManuelSpinola
Copy link
Author

My newdata has NA, is that a problem?

@bwiernik
Copy link
Contributor

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

@ManuelSpinola
Copy link
Author

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.

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

2 participants