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

lfo returns NA if L is larger than the length of series for some group(s) #72

Closed
helske opened this issue Jun 28, 2023 · 1 comment
Closed
Assignees

Comments

@helske
Copy link
Collaborator

helske commented Jun 28, 2023

Consider a case where T is the sample size of the largest group, L<T is the length of initial fit in lfo, and where there is less than L observations in some groups. This leads to NA elpd for those groups, which is then propagated to the final ELPD estimate. This probably happens also in a case where some series have NA values at the beginning of the series for K > L time points. It's probably enough to add na.rm = TRUE to few places in the end to handle both of these cases.

@helske helske self-assigned this Jun 28, 2023
@helske
Copy link
Collaborator Author

helske commented Jun 28, 2023

Actually it seems that issue happens only when refitting the model, adding na.omit when storing elpds (which I think we had before) should do the trick.

@helske helske closed this as completed in 70a4ecd Jun 28, 2023
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