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

Future steps #1

Open
3 of 12 tasks
catarinawor opened this issue Sep 4, 2024 · 2 comments
Open
3 of 12 tasks

Future steps #1

catarinawor opened this issue Sep 4, 2024 · 2 comments
Assignees

Comments

@catarinawor
Copy link
Contributor

catarinawor commented Sep 4, 2024

These are the future steps Robyn and I agreed on September 4th 2024

Immediate TODO

  • replace likelihood functions: Robyn
  • built in testing functions -check in with Andy
  • build template input files and read data functions - similar to chisca structure: Catarina
  • Move global objects to data object: Robyn
  • Explore map options for logRo- mirror?: Catarina to see notes from TMB course.
  • Move everything fro ctl into the dat file.
  • remove par$ , dat$ and ctl$ from the main RTMB model
  • Remove any source() calls for files in the R folder
  • On R/project_model.R the library calls should be removed
  • add more than one chain when running TMBstan, check with Dan on how to combine chains

Later improvements

  • Explore setting up the recruitment deviations as random effects
  • Weight of survey observations
@seananderson
Copy link
Member

Testing: https://r-pkgs.org/testing-basics.html

Mirroring: supply a named list to the map argument; matching numeric factor levels get mirrored, factor NAs get fixed at starting values

Stan: the chains are already combined in the output although the format depends on whether you extract a list, data frame, or array. Also see the wonderful tidybayes package and shinystan. I believe most defaults discard the warmup before returning samples. Standard is >= 4 chains, discard first half as warmup, usually 2000 total, 1000 warmup per chain. Test runs can be much shorter. No thinning. Ideally start from dispersed starting positions not the MPD. Check Rhat and n_eff.

@robynforrest
Copy link
Contributor

I have updated the likelihood components to use R density functions. NOTE that the functions in ADMB's statslib.h are set up to return the negative of the log likeihood (i.e., the negative is built in to the function). This could be confusing and explains why iscam's objective function is the sum of the nll components not the difference. DDRTMB is now consistent with other models in R.

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

3 participants