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

add CAIC and EDF calcs #387

Merged
merged 3 commits into from
Dec 12, 2024
Merged

add CAIC and EDF calcs #387

merged 3 commits into from
Dec 12, 2024

Conversation

James-Thorson-NOAA
Copy link
Collaborator

adding function for conditional AIC (CAIC) and effective degrees of freedom (EDF), thanks to new derivation by Nan Zheng for generic calculation using AD+Laplace approximation methods in TMB

James-Thorson and others added 3 commits November 27, 2024 20:50
- style code
- copy edit docs
- define cAIC generic
- CAIC -> cAIC
- add example
- add unit test
- don't require() Matrix
@James-Thorson
Copy link
Contributor

@seananderson do you want me to look at this again? As I said before, I'd still like an option for the EDF to be incorporated into the print_one_model output (similar to mgcv::summary),

@seananderson seananderson merged commit 5e1cda8 into main Dec 12, 2024
4 of 5 checks passed
@seananderson
Copy link
Member

I've got as far as cleaning things up and passing all R CMD checks and I just incorporated the function into the main branch so it can be used. Getting the pretty printing working is going to take a chunk of time I haven't found yet, but I'll leave the other issue open until that's done. On top of splitting the smoother, time-varying random effect, and IID random effect groups, there's also the delta model dimension to consider. I'll start with the smoothers, which I already have some code lying around for.

@James-Thorson
Copy link
Contributor

Awesome! Please tell me if you want me to share how I distinguished the groups in demo code for tinyVAST.

Also, I just realized that I had a bug in my various versions, and sorry for catching it now! Specifically it should be q <- sum(indx) instead of q <- length(indx). Do you want me to do a quick PR?

seananderson added a commit that referenced this pull request Dec 12, 2024
And increase precision on unit test
@seananderson
Copy link
Member

No problem. I've fixed the q/indx bug in the main branch.

Please tell me if you want me to share how I distinguished the groups in demo code for tinyVAST.

Sure, I'll take any ideas!

seananderson added a commit that referenced this pull request Dec 14, 2024
seananderson added a commit that referenced this pull request Dec 14, 2024
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

Successfully merging this pull request may close these issues.

3 participants