Code Monkey home page Code Monkey logo

Comments (23)

cgrandin avatar cgrandin commented on July 17, 2024 1

Ok, these are all done. The mcmc diagnostic plots really add to the length of time it takes to compile the document so I'm going to comment them out and we can uncomment the ones to be included later. I have attached pdf of them here so you can have a looksee

herring-2017-mcmc-diags-sens-m.pdf

from csas-latex.

jaclyncleary avatar jaclyncleary commented on July 17, 2024 1

I had to google that ;)

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

Yes, it should be possible, but they might not be the prettiest with the little time we have left. I'd need the model output asap though. I don't see it on the private herring repo

from csas-latex.

jaclyncleary avatar jaclyncleary commented on July 17, 2024

they're here:
./github/Herring/2017mcmc/01_Natural_Mortality/Stock/AM1_constantM

etc

from csas-latex.

Shawkshaw avatar Shawkshaw commented on July 17, 2024

If you fetch and merge with me again they should all also be in the models_new folder (I updated this morning):
-AM1cM/AM2cM are constant M and
-the base case AM1/AM2 are the timevaryingM

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

Thanks. I may have to restructure the directories to get the code to work though.

I've also noticed that in the private Herring repo, there are no mcmc folders inside the model folders. So they have to be made manually and everything moved over each time or the code won't work.. Can I do this then push to that repo so it doesn't have to be done again?

Thanks Sarah, I did merge a couple of hours ago

from csas-latex.

grinnellm avatar grinnellm commented on July 17, 2024

The script ResearchDocumentV2.R has a function to move the *_mcmc.csv files to a subfolder "mcmc".
ArrangeOutput()

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

Great.. thanks Matt

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

On the biomass plots that I've just added, the CIs are plotted for all models. The shaded area represents the AM2 model's uncertainty.

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

nage2 is the first column of N in the rep file right? I don't think there are any outputs for it in the mcmc.

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

q is just a single number, i.e. there is no q time series to plot

from csas-latex.

grinnellm avatar grinnellm commented on July 17, 2024

Correct me if I'm wrong..
I get nage2 from "iscam_rt_mcmc.csv" for the MCMC runs to calculate median and CIs, and I get nage2 from "iscam.rep" ($rt) for the MPDs.
And there are two q's: a single value for q1 from 1951 to 1987, and a single value for q2 from 1988 to 2017.

from csas-latex.

Shawkshaw avatar Shawkshaw commented on July 17, 2024

Correct, and this is what the time series of q looks like:
4a_6a_q

from csas-latex.

jaclyncleary avatar jaclyncleary commented on July 17, 2024

plotting q~t: Matt's description is correct. so the plot is rather boring, e.g.,
qplot

q-values can be taken from rep or iscam_mcmc.csv (what ever is easiest). When I added the plot to iscam-gui, I had to create a vector of length (1951:1987) for q1 and length (1988:2017) for q2 because for the q-vector in iscam.rep doesn't fill (it's all zeros)

nage2:
yes- nage2 is the first column of N in the rep file right OR
you can use the nage2 from iscam_rt_mcmc.csv -- remember this matrix is missing nage2 for 1951 and 1952. In V1 we had the mcmc outputs of nage2 saved as a .mcmc file so that is what you used for plotting last year (but we didn't add this yet).

from csas-latex.

jaclyncleary avatar jaclyncleary commented on July 17, 2024

in other words, the first column of N in the rep file is the same as rep$rt, but the model back-calculates the number of 2yr olds for 1951 and 1952 for the N matrix.

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

Thanks, that totally clarifies it!

from csas-latex.

jaclyncleary avatar jaclyncleary commented on July 17, 2024

@cgrandin
Geez HG-constantM have some ugly ski jumps in the pairs plots.
Also it looks like all the figure labels for stock-timevaryingM (e.g., Fig 6, 12, 18, 24, 30) need to be changed from constant natural mortality to "time-varying natural mortality".

from csas-latex.

jaclyncleary avatar jaclyncleary commented on July 17, 2024

Also, figure caption edit: The MCMC run had chain length 5 million, with a sample taken at every
1,000th iteration.
(final saved chain length is 5,000)

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

Ya those ones look like a rorschach test. I've just fixed those errors in commit 65fd23f

from csas-latex.

Shawkshaw avatar Shawkshaw commented on July 17, 2024

I updated the figures for this one in the 8_figures.rnw file in commit 39c405c

The plots should be AM1_timevarying, AM1_constantM, AM2_timevaryingM and AM2_constantM
I changed them all to the code below and hopefully I did not break them:
make.index.fit.plot(list(hg.am1.constm,
hg.am1.tvm,
hg.am2.constm,
hg.am2.tvm
),
start.yr = 1950,
end.yr = 2016,
ind = 1,
leg = "topright",
model.names = c("AM1 Time-varying M","AM1 Constant M","AM2 Constant M","AM2 Time-varying M"),

from csas-latex.

cgrandin avatar cgrandin commented on July 17, 2024

It's all working!

from csas-latex.

Shawkshaw avatar Shawkshaw commented on July 17, 2024

I notice we have fishing mortality plots for this sensitivity.
Jaclyn do we also want the estimated Natural mortality?

from csas-latex.

Shawkshaw avatar Shawkshaw commented on July 17, 2024

I also can not figure out how to remove the index inputs bars and dashes from the index fits. I think we want just dots for the input observed data.
Is the file to change this doc/r/r-functions/figures-indices.r ?
Jaclyn, can you remember how you did this in the gui?

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.