Git Product home page Git Product logo

selfisher's People

Contributors

bbolker avatar casperwberg avatar fishfollower avatar kaskr avatar koenvanbenthem avatar mebrooks avatar mmaechler avatar skaug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

selfisher's Issues

starting values from L50 and SR

Make it possible to set a simple model's starting values based on guesses for L50 and SR. This is based on discussions with Juan Santos about convergence issues and starting values.

Make it possible to omit SR and use a default as a proportion of L50. What proportion should be used?

Later make it work for more complex models, i.e. with covariates other than length. In those cases with complex models have convergence problems, it might be best to first fit a simple model and use those coefficients as starting values.

sampling fractions in paired gear and non-logit link models

Accounting for sampling fractions with paired gear data (models with psplit=TRUE) might require some machinery other than offsets. I need to work out the math to check, but simulations indicate that offsets won't work.

At the same time, it might be possible to do something about #19 and make it possible to account for sampling fractions in models in models with non-logit links.

predict splines in new data

Basically, there is a bug if you try to predict from a model that used a spline with newdata that is extrapolated beyond the original data. I'm working on fixing it and should be done in a few days. Some details are in the related glmmTMB issue.

To do for manuscript 1

  1. Add descriptions of new data files
  2. Add examples using new data
  3. Update citation to Bioarxiv after uploading manuscript draft
  4. Check vignettes and update as needed

add indicator functions

Add a discard ratio function that calculates the discard ratio (# discarded / #caught) for both gear types in catch-comparison analyses.

Also add functions to calculate indicators nP- and nP+

Input should be any length cutoff.

add bootstrapping method of raised data

  1. resample hauls
  2. resample individuals observed within hauls
  3. raise resampled individuals according to sampling fractions or raising factors (requires new input format other than qratio)
  4. refit model to raised numbers

This assumes that larger hauls should have more influence on the fit, even if all fish weren't observed. This may be based on an assumption that selectivity changes systematically with total catch; thus it may be possible to achieve similar results by including total catch in a fixed effect.

L50 for any model

Write a general function that takes any model, makes predictions from that model, and finds values of L (or whatever covariates are in the mode) which correspond to 50% retention probability. Predictions could be made on all unique combinations of covariates (including L) found in the original dataset to avoid extrapolating beyond the observed range.

allow capitalized link = "Richards"

Currently, link="richards" is all lower case, but since it's a name, allow for the capitalized version. Before changing, check if R just accepts both versions without complaining.

beta-binomial for overdispersion

Eventually it would be nice to add the beta-binomial distribution to handle overdispersion. For now, the only way to handle it is with an observation level random effect.

Use the robust method dbetabinom_robust recently written for glmmTMB by kaskr.

See section 4.1 of Tom Mitchell Elliott's master thesis for an attempted implementation of this in a Bayesian context (it had convergence difficulties). Or see Kitakado et al (2002) for a publication suggesting that we might need this.

bootSel example

Add example to help file of bootSel. Also, mention the vignette.

possible error in logit(phi) eqn. in selfisher.cpp

In your TMB code, you have the following code (lines 524-527 in selfisher.cpp) for logit(phi):

} else { //covered codend or catch comparison
for (int i = 0; i < r.size(); i++) {
logit_phi(i) = log(q(i)) + logit_inverse_linkfun(etar(i), etad(i), link); //log(q) + logit(r)
}

which I think is wrong--I think the term involving etar(i)... should evaluate to log(r), not logit(r) [see detail provided below]. Thus, the term should be "log(inverse_linkfun(etar(i), etad(i), link))", or just "log(r(i))" since you already computed r(i)=inverse_linkfun(etar(i), etad(i), link) back on line 514. However, it's also possible I'm completely off track!

Results from a similar comparison between AFSC and BSFRF side-by-side catches for snow crab by Somerton et al (2013: CJFAS 70:1699-1708) were based on fitting the equation
logit(phi) = log(r(z)) + log(q) [not logit(r(z)) + log(q)]
which was developed from
phi = (S_apr(z))/[S_apr(z)+S_b*(1-p)]
where z is size, r(z) is the fraction of individuals entering the AFSC gear that were retained, S_a is the sampling fraction for the AFSC gear, S_b is the sampling fraction for the BSFRF gear, and p is the assumed fractional split for the AFSC gear of the total number of crab entering the combined gear. p for each haul was assumed to be the fraction of the total area swept by the AFSC gear (i.e., p=A_a/[A_a+A_b] with A_a = area swept by AFSC gear, A_b=area swept by BSFRF gear). Setting q=A_bS_b/(A_aS_a) in the equation for phi and taking the logit of both sides gets you to the first equation.

Buck Stockhausen ([email protected])

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.