Code Monkey home page Code Monkey logo

rceattle's People

Contributors

grantdadams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

sowasser

rceattle's Issues

Map out gam_ua

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.

Modules

  • Growth
  • Selectivity
  • Recruitment
  • Weight-at-age
  • Diet fitting
  • Bioenergetics/consumption/VBGF - M2

Use map for switches/phasing

Add sterring committee and readme

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

Initialization of plus group

@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))))

Likelihood components to do

  • M1_like
  • M2_like
  • srv_sel_like
  • fsh_sel_like
  • norm_srv_like
  • norm_fsh_like
  • srv_bio_like
  • fsh_cat_like
  • srv_age_like
  • fsh_age_like
  • eit_age_like

Recruitment of the last year

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

UobsWtAge default to include years in data

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.

Model Objects to Incorporate/Rename

  • ATF_consumed
  • avail_food_1
  • avail_food_2
  • avail_food_3
  • availB_1
  • availB_2
  • availB_3
  • AvgN_1
  • AvgN_2
  • AvgN_3
  • AvgN2_1
  • AvgN2_2
  • AvgN2_3
  • Bage_1
  • Bage_2
  • Bage_3
  • BageN_1
  • BageN_2
  • BageN_3
  • Biomass_1
  • Biomass_2
  • Biomass_3
  • biomassByage_1
  • biomassByage_2
  • biomassByage_3
  • BiomassSSB_1
  • BiomassSSB_2
  • BiomassSSB_3
  • Consum_1
  • Consum_2
  • Consum_3
  • Consum_living_1
  • Consum_living_2
  • Consum_living_3
  • E_1
  • E_2
  • E_3
  • Eage_1
  • Eage_2
  • Eage_3
  • Eage_hat_1
  • Eage_hat_2
  • Eage_hat_3
  • EageN_1
  • EageN_2
  • EageN_3
  • eit_age_like
  • eit_hat
  • eit_srv_like
  • F_1
  • F_2
  • F_3
  • F_avg
  • fsh_age_hat_1
  • fsh_age_hat_2
  • fsh_age_hat_3
  • fsh_age_like_1
  • fsh_age_like_2
  • fsh_age_like_3
  • fsh_age_obs_1
  • fsh_age_obs_2
  • fsh_age_obs_3
  • fsh_age_type
  • fsh_cat_like_1
  • fsh_cat_like_2
  • fsh_cat_like_3
  • fsh_sel_1
  • fsh_sel_2
  • fsh_sel_3
  • fsh_sel_like_1
  • fsh_sel_like_2
  • fsh_sel_like_3
  • fT_1
  • fT_2
  • fT_3
  • L2A_convert_1
  • L2A_convert_2
  • L2A_convert_3
  • lengths
  • ln_mn_rec
  • ln_mn_rec.se
  • logR_obs
  • logR_obs.5.minus
  • logR_obs.5.plus
  • logR_obs.minus
  • logR_obs.plus
  • M1_1
  • M1_2
  • M1_3
  • M1_like_1
  • M1_like_2
  • M1_like_3
  • M2_1
  • M2_2
  • M2_3
  • M2_like_1
  • M2_like_2
  • M2_like_3
  • M2_pen_1
  • M2_pen_2
  • M2_pen_3
  • N_1
  • N_2
  • N_3
  • Nage_1
  • Nage_2
  • Nage_3
  • nages_1
  • nages_2
  • nages_3
  • NByage_1
  • NByage_2
  • NByage_3
  • nlengths
  • nspp
  • nyrs
  • obj_fun
  • obs_catch_1
  • obs_catch_2
  • obs_catch_3
  • obs_catch_hat_1
  • obs_catch_hat_2
  • obs_catch_hat_3
  • obs_eit
  • obs_eit_age
  • other_food
  • overlap_1
  • overlap_2
  • overlap_3
  • PCOD_consumed
  • PLK_consumed
  • pmature_1
  • pmature_2
  • pmature_3
  • pred_E_1
  • pred_E_2
  • pred_E_3
  • prey_consumed_1
  • prey_consumed_2
  • prey_consumed_3
  • Pvalue_1
  • Pvalue_2
  • Pvalue_3
  • R_1
  • R_2
  • R_3
  • ration_1
  • ration_2
  • ration_3
  • ration2_1
  • ration2_2
  • ration2_3
  • rec_dev
  • rec_dev.se
  • S_1
  • S_2
  • S_3
  • srv_age_hat_1
  • srv_age_hat_2
  • srv_age_hat_3
  • srv_age_like_1
  • srv_age_like_2
  • srv_age_like_3
  • srv_age_obs_1
  • srv_age_obs_2
  • srv_age_obs_3
  • srv_age_type
  • srv_age_yrs_1
  • srv_age_yrs_2
  • srv_age_yrs_3
  • srv_bio_1
  • srv_bio_2
  • srv_bio_3
  • srv_bio_hat_1
  • srv_bio_hat_2
  • srv_bio_hat_3
  • srv_bio_like_1
  • srv_bio_like_2
  • srv_bio_like_3
  • srv_bio_se_1
  • srv_bio_se_2
  • srv_bio_se_3
  • srv_sel_1
  • srv_sel_2
  • srv_sel_3
  • srv_sel_like_1
  • srv_sel_like_2
  • srv_sel_like_3
  • styr
  • suit_main_1_1
  • suit_main_1_10
  • suit_main_1_11
  • suit_main_1_12
  • suit_main_1_2
  • suit_main_1_3
  • suit_main_1_4
  • suit_main_1_5
  • suit_main_1_6
  • suit_main_1_7
  • suit_main_1_8
  • suit_main_1_9
  • suit_main_2_1
  • suit_main_2_10
  • suit_main_2_11
  • suit_main_2_12
  • suit_main_2_2
  • suit_main_2_3
  • suit_main_2_4
  • suit_main_2_5
  • suit_main_2_6
  • suit_main_2_7
  • suit_main_2_8
  • suit_main_2_9
  • suit_main_3_1
  • suit_main_3_10
  • suit_main_3_11
  • suit_main_3_12
  • suit_main_3_13
  • suit_main_3_14
  • suit_main_3_15
  • suit_main_3_16
  • suit_main_3_17
  • suit_main_3_18
  • suit_main_3_19
  • suit_main_3_2
  • suit_main_3_20
  • suit_main_3_21
  • suit_main_3_3
  • suit_main_3_4
  • suit_main_3_5
  • suit_main_3_6
  • suit_main_3_7
  • suit_main_3_8
  • suit_main_3_9
  • suit_other_1
  • suit_other_2
  • suit_other_3
  • tc_biom_obs_1
  • tc_biom_obs_2
  • tc_biom_obs_3
  • tc_hat_1
  • tc_hat_2
  • tc_hat_3
  • tc_obs_1
  • tc_obs_2
  • tc_obs_3
  • TempC
  • Type
  • Tyrs
  • Ucheck_1
  • Ucheck_2
  • Ucheck_3
  • wt_1
  • wt_2
  • wt_3
  • wt_in_stom_1
  • wt_in_stom_2
  • wt_in_stom_3
  • WtbyAge_1
  • WtbyAge_2
  • WtbyAge_3
  • WtbyL_1
  • WtbyL_2
  • WtbyL_3
  • yrs_fsh_comp_1
  • yrs_fsh_comp_2
  • yrs_fsh_comp_3
  • yrs_srv_biom_1
  • yrs_srv_biom_2
  • yrs_srv_biom_3

tc_age_hat is indexed by yrs_tc_biom rather than yrs_fsh_comp

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.

Installing Rceattle from github

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!

Estimate MSVPA Type 2/3 exponent - Also have estDiet switch

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

Survey Time Adjustment exp(-Z * survey_mo)

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.

Input length bins - Francis weighting

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.

Things to do to cpp file

  • Add survey and fishery year indexes to account for missing years of data
  • Add predation function (M2)
  • Move likelihood to different section from population dynamics estimation
  • Add switches to change R and F priors to random effects
  • Change n_eit to n_bt for BT survey
  • Initial abundance at age likelihood
  • Fishery selectivity
  • Fix matrix multiplication for ATF ALK
  • Deal with weight-at-age
  • BT selectivity
  • Survey age composition
  • Fishery age composition
  • Fishery selectivity likelihood

Add Fishery Selectivity Penalty?

// ----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)))));

2017 PCod age_trans_matrix rows dont sum to 1 - underestimate fishery catch-at-length

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

eit_sel has 39 years while n_eit is 20

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.