grantdadams / rceattle Goto Github PK
View Code? Open in Web Editor NEWTMB based age-structured multi-species model. Estimation, simulation, management strategy evaluation.
TMB based age-structured multi-species model. Estimation, simulation, management strategy evaluation.
nselages is currently set to 8 for all species
gam_ua will need to be mapped out if predation mortality from Kinzey are not used. Prey ages not observed will also have to be mapped out.
Use map for switches/phasing
Add readme and contact sheet
Think about governance structure
Communications with developers
Have points of contact with users
Steering committee - group of people that help decide what to include in the code
DOI needs versioning
Version control
Naming convention
Code-checking, tests
Doxygen
User manual
List of publications
Testthat
Include in NOAA toolbox?
Feature set
Possible steering committee: Jim, Kerim, Steve, Ingrid, Martin, Dana
How to facilitate communication between users/developers
Examples/tests for how to do each feature
@kholsman do we want the plus group to be initialized at N(sp,1,nages(sp)) /= (1.-mfexp(-M1(sp,nages(sp))));
on line 2335 of the ADMB code/ Line 277 of the TMB code, or as N(sp,1,nages(sp)) /= (1.-mfexp(-nages(sp) * M1(sp,nages(sp))))
readdat currently has flexibility for ragged matrices, will need to add flexibility for ragged arrays.
Double check with @kholsman if there are other 3D array data inputs besides c("obs_catch", "wt", "srv_age_obs", "age_trans_matrix")
It would be easier to work with the arrays as [year, age, species] for matrix multiplication
ask @kholsman for eit_age_hat to be included in output from ADMB model
May bomb out
Uobs.Wt
will not work in c++, will have to change names of within .dat
files
Remove years from the BSAI data and see if it fits to evaluate if there is an indexing issue.
Two years of age-1s are defined as the same in the ADMB file
lines 2330-2331
for (int yr=1;yr<=nyrs;yr++)
N(sp,yr,1) = R(sp,yr); // Recruitment
N(sp,nyrs+1,1) = R(sp,nyrs); // Recruitment in nyrs+1
E.g.
log(mean(mfexp(fsh_sel_coff(sp))));
log(mean(mfexp(fsh_sel(sp))));
Default to have UobsWtAge include years in dataframe. Currently can include year column or not. But better to have all data include years and set year = 0 if its an average across all years.
The offset is added to the fishery age comp likelihood each year rather than across the board with each species. What does changing this weighting scheme do?
I will need to rename TempC, Diet_Mat, phi_p_bp, bLW, d, Winf, Prop_Mat in the cpp file to that of the .dat inputs.
Put bounds on parameter estimates
build a mfexp function
Phasing
In the ADMB version of CEATTLE, tc_age_hat
is generated by using 'yrs_tc_biom' as a yr_ind and then yrs_fsh_comp
is then used to index tc_age_hat
in the likelihood. However, if there are any years where total catch is not available but fish age comp is this may be problematic.
Do we want EIT biomass to have the mid-year penalty?
Also where are the estimates of EIT selectivity?
I have several parameters related to selectivity and SPR-based F rates that should probably be estimated in log space.
In the data set test_0jim.dat the nyrs_fsh_comp does not match the length of years in yrs_fsh_comp. Will have to include a test function to make sure they match or replace nyrs_fsh_comp(i) for yrs_fsh_comp.row(i).size() in cpp file.
@kholsman
Ask the bioacoustic team about updating selectivities.
tc_obs and tc_obs_age are not in the .dat files. For future reference, if I start taking data in from the .dat files rather than the tmp output from the ADMB model, will have to change both to internal data types and calculate locally.
will need to calculate fsh_age_obs
and srv_age_obs
in TMB code
I'm trying to install the Rceattle package according to the vignette instructions: devtools::install_github("grantdadams/Rceattle", auth_token = "4925b42ac46f1e0aefd671e9dc0c1cf1b3157017", build_vignettes = TRUE)
but am getting an error:
Error: Failed to install 'Rceattle' from GitHub: arguments imply differing number of rows: 0, 1
Any ideas? Thanks!
In the MSVPA Holling Type Equation change msmMode in the pow(AvgN, msmMode) to a parameter that can be estimable. Also have a switch that will include diet likelihood.
Will need to change suit_tmp divisor and instances of pow(AvgN(ksp, k_sex, k_age, yr), msmMode)
One possibility is to us H_4
In the estimates of survey biomass and age composition have an input that adjusted mortality based on the timing of the survey. This would allow increased flexibility.
Age bins are implicitly included via minage and nages for each species. Nlengths is included, but specific length bins are needed to calculate Francis composition weights. Will need to include the length bins to calculate expected length.
Update map for selectivity blocks when data provided include years after nyrs. Will need to subset.
// ----Selectivity penalties...for smooth second diff etc
// Invoke a penalty when the partial F's go down with sp_age
for (int sp_age=1;sp_age<nages(sp);sp_age++)
if (fsh_sel(sp,sp_age)>fsh_sel(sp,sp_age+1))
fsh_sel_like(sp) += 20.*square(log(fsh_sel(sp,sp_age)/fsh_sel(sp,sp_age+1)));
fsh_sel_like(sp) += curv_pen_fsh(sp)*norm2(first_difference( first_difference(log(fsh_sel(sp)))));
The rows of age transition matrix for pcod do not sum to 1, they sum to values below 1
However, for the fishery catch-at-length for PCod, catch-at-length is divided by the sum of catch-at-age to get age comp, leading to under estimates of length-comp for PCod.
Will need to add check for age-trans-matrix rows sum to 1
And/or have the catch-at-length divided by sum of catch-at-length
May need to update src if how data are compiled changes in updated versions of CEATTLE.
Change: ' eit_age_hat(y, j) = NByage(eit_yr_ind, j, 0) * eit_sel(eit_yr_ind, j) * eit_q; // Remove the mid-year trawl?' on line 421
Clarify naming conventions for different versions/branches of Rceattle
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.