Code Monkey home page Code Monkey logo

Comments (21)

grinnellm avatar grinnellm commented on August 16, 2024

On that note, are the Bev-Holt parameters saved somewhere?

from csas-latex.

Shawkshaw avatar Shawkshaw commented on August 16, 2024

These should all be in the iscam.rep file
so
kappa
beta
ro

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

The function I used in my old R code:

plot.curve <- function(sbo, clr)
{
st=seq(0, max(sbt, sbo), length=100) #correct, sbo
if(rectype==1)
{
#Beverton-Holt
rrt=kapparost/(sbo+(kappa-1)st)exp(-0.5tau^2)
}
if(rectype==2)
{
#Ricker
rrt=kappa
rostexp(-log(kappa)st/sbo)/sbo exp(-0.5tau^2)
}
lines(st, rrt, col=clr)
ro=ro
exp(-0.5*tau^2)
points(sbo, ro, pch="O", col=clr, cex=1.25)
points(sbo, ro, pch="+", col=clr, cex=1.25)
}
plot.curve(sbo, clr=4);
print("blue curve and blue circle+= sbo per SSB")

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

Hmm, I must be missing something, sorry. Can you spell it out for me? The BH equation above:
rrt=kapparost/(sbo+(kappa-1)st)exp(-0.5tau^2)
looks like it's missing some punctuation? Can you write it with so, kappa, beta, and ro?

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

Nope, I think I have it.

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

bevertonholt

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

great. we'll make an assessment biologist out of you yet :)

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

Matt- Just double checking with you on eqns, that you plotted:
xx = sbt[1:(length(yr)-min(age))]
yy = rt

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

You mean that I omitted the first two years of Recruits?

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

that you omit the first two years of sbt. the rt vector is already 2 years shorter than sbt. basically we don't have rt values to match with sbt_1951 and sbt_1952 because we would have had to observe them in 1959 and 1950.

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

You got it - I omitted the first two years of rt and sbt, so I use years 1953 to 2017. I just want to confirm my equation is correct (assessment biologist in training). I extract the following variables from the iscam.rep file:

  • so (not used -- is that correct?)
  • kappa
  • beta
  • ro
  • sbo

And then I calculate Recruitment as

  • Recruitment = kappa * ro * Abundance / (sbo + (kappa - 1) * Abundance) * exp(-0.5 * beta^2)

where Abundance is sbt from the iscam.rep file. Is that correct?

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

I think we're saying the same thing. For the points: plot the vector of rt values (vector length is 65 representing 1953-2017) on the y-axis against sbt [1953-2017] from iscam.rep file, removing the first two values of the sbt vector.

Then for the BH curve, use the equation as you've written but use tau in the last term. Ie, * exp(-0.5 * tau^2)
yes abundance == sbt from iscam.rep, and tau is also in the iscam rep file.

Can you also please add a symbol to show sbo vs. ro (both from iscam.rep)?

In looking at my old code, I see the following equation used in the plotting of ro:
ro=roexp(-0.5tau^2)

@Shawkshaw - do you know why/ what this adjustment to ro represents?

Add to caption: symbol x corresponds to the MPD estimate of unfished spawning biomass (SB0) and unfished age-2 recruitment R0

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

bevertonholt

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

Getting closer:)
Triangles represent MPD of SB_0 vs R_0.
Is that the bias correction for the log-transformed data?

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

perhaps eh? In the old figs, the "triangles represent MPD of SB_0 vs R_0" fall directly on the line.

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

Yes, I thought it would be on the line too -- might be bug somewhere? This is the current equation:

  • Recruitment = kappa * ro * Abundance / (sbo + (kappa-1) * Abundance) * exp(-0.5 * tau^2)

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

the equation is correct.
let's see if @Shawkshaw has something to add :)

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

@Shawkshaw - clarification: the ro=ro*exp(-0.5tau^2) changes the triangle in the figs so that it's on the line, and I'm not sure why (i.e., what this equation represents, except that Steve did it...)

from csas-latex.

Shawkshaw avatar Shawkshaw commented on August 16, 2024

Jaclyn, I can't seem to find any reference to this particular equations but if you look at this parameterization of the B-H model Rt=(soBt-k/(1+betaBt-k))exp(residuals-0.5tau^2) and the parameterization of the equation we are using Rt = k * ro * Bt / (sbo + (k-1) * Bt) * exp(-0.5 * tau^2) he set the equation up for estimating unfished recruits (ro) by setting everything but the process error (tau) at 0 ...

from csas-latex.

grinnellm avatar grinnellm commented on August 16, 2024

Can we close this? The MPD points are not on the lines in the current version -- is that how you want it @jaclyncleary ? It's easy to apply the correction (above) to put them on the lines if you prefer.

from csas-latex.

jaclyncleary avatar jaclyncleary commented on August 16, 2024

let's leave them as-is. I don't actually know whether they are supposed to be on the line or not...

from csas-latex.

Related Issues (20)

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.