bbolker / bbolker/bbmle

Default behavior for determining nobs

Open
#34 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
26
Forks
14
Avg merge
18m
Merged PRs (30d)
2

Description

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.

https://github.com/bbolker/bbmle/blob/918d335be65296cd5acbe82b76d694f168ca36a3/R/mle.R#L587

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the linked line in R/mle.R around line 587 and trace how mle2 determines nobs from the data argument. Reproduce the incorrect AICc and nobs values with the relevant data forms, then establish and test a default behavior that remains correct across those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.