pbs-assess / DDRTMB

A delay-difference model written in RTMB
GNU General Public License v3.0
0 stars 0 forks source link

Future steps #1

Open catarinawor opened 1 month ago

catarinawor commented 1 month ago

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

Immediate TODO

Later improvements

seananderson commented 1 month ago

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 commented 1 month ago

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.