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

Default behavior for determining nobs #34

Open
stouffer opened this issue Apr 14, 2023 · 1 comment
Open

Default behavior for determining nobs #34

stouffer opened this issue Apr 14, 2023 · 1 comment

Comments

@stouffer
Copy link
Contributor

I'm a huge fan of leveraging mle2 for fitting complex models. However, I have run into multiple instances where I obtain values for downstream quantities like AICc which don't make sense.

Approximately 99 times out of 100, this is because the value being determined internally for nobs is incorrect. Because the object passed to the function using the argument data could hypothetically take just about any form, it seems to me that the assumption inherent in the following line of code is only sometimes guaranteed to be correct.

bbmle/R/mle.R

Line 587 in 918d335

if (!missing(data)) attr(m,"nobs") = length(data[[1]])

@bbolker
Copy link
Owner

bbolker commented Nov 24, 2023

Very late to this party, but what do you recommend in this situation?

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