fishfollower / sam Goto Github PK
View Code? Open in Web Editor NEWGit page for SAM R-package
Git page for SAM R-package
setup.sam.data should check that number of years and ages match what is expected ala stockassessment.org datavalidator
Hi,
I've found these release tags helpful to reference, download, and compare versions:
git tag v0.9.0 df0b7c1
git tag v0.8.1 92aa728
git tag v0.8.0 1347c74
git tag v0.7.0 1dcf8b6
git tag v0.6.0 334a34b
git tag v0.5.5 d9a0c42
git tag v0.5.4 bf56f2b
git tag v0.5.3 02395eb
git tag v0.5.2 c8c940d
git tag v0.5.1 c460203
git tag v0.5.0 3c5f8dd
git tag v0.4.0 24081bd
git tag v0.3.0 186ec82
git tag v0.2.0 796f7c1
git tag v0.1.0 ea59306
git tag v0.0.9 5a1e1d3
git tag v0.05 367a8ae
git tag v0.04 0619022
# git tag v0.03 16eea2a
git tag v0.02 cddb008
# git tag v0.01 09f67ed
Perhaps they can be tagged in the main repository?
Would it make sense for the .plotit funciton to be public so that users can see the arguments (e.g. add, ci, cicol)? Alternatively, we may want to document these arguments for each of the other functions they can be used with (e.g. ssbplot)
I'm having a problem updating my package:
cc1plus.exe: out of memory allocating 538160 bytes
make: *** [C:/Users/taylor/DOCUME~1/R/R-36~1.3/etc/i386/Makeconf:215: stockassessment.o] Error 1
ERROR: compilation failed for package 'stockassessment'
* removing 'C:/Users/taylor/Documents/R/win-library/3.6/stockassessment'
The solution is to only install within the R 64-bit version:
devtools::install_github("fishfollower/SAM/stockassessment", INSTALL_opts=c("--no-multiarch"))
Maybe something add to the readme.
missing number in keyLogFsta (e.g. 0 1 3 4) causes segfault
missing number in keyCorObs causes non-positive definite Hessian
also check that obsCorStruct code matches numbers/NAs used in keyCorObs
It seems that with the argument newtonsteps=0
travis and I get different results for diag.cov
, gradient
, and sdrep$value
. The tests pass on my Mac (where I created the expected results), so maybe it's a platform issue? Also, travis tests were passing with newtonsteps=3
.
Dear sirs,
I wonder if there is a function in the package stockassessment that enables calculating the reference points and mainly MSY.
best regards.
Hi!
I need a specific version of the stockassessment package to run my analysis. I have this version installed in a project-specific library called myproject/library
. Other analyses use other versions of stockassessment. To avoid confusion while working on my project, I do not have the stockassessment package installed globally. I load the correct version using the command
library(stockassessment, lib.loc="myproject/library")
I already have model.RData containing the fit object, but an error occurs when I run
retro(fit, year=4)
because it tries to load the wrong version of the stockassessment package, the global version instead of my project-specific package that is already loaded.
The source of the problem seems to be this line of code
https://github.com/fishfollower/SAM/blob/8ebd840/stockassessment/R/run.R#L170
where the jit
function calls library(stockassessment)
to load the package to each node.
Do you think it would be possible to implement jit
without an explicit library()
call? Currently, it assumes something about the user setup - that only one version of stockassessment is installed - and this assumption may not always hold.
I'll experiment a bit more with this and get back to you.
fix simulation when fixed weights are given
retro
and leaveout
should use parLapply
from the parallel
package (distributed with base R). See simulate
vignette for an example of how to use parLapply
.
It seems that there might be a bug in the nscod example. When I run make
in that directory, I get this
Error in scan(filen, skip = 2, n = 5, quiet = TRUE) :
scan() expected 'a real', got 'IBTS_Q1_gam'
Calls: source -> withVisible -> eval -> eval -> read.ices -> scan
Execution halted
make: *** [all] Error 1
I didn't look into the details.
Hi,
When I run:
fit <- fitfromweb("nscod19_ass01")
fitplot(fit)
I was expecting to get a plot, but instead I get the following error:
Error in retape(set.defaults = FALSE) :
Error when reading the variable: 'constRecBreaks'. Please check data and parameters.
In addition: Warning message:
In retape(set.defaults = FALSE) : Expected object. Got NULL.
This is in the current version of stockassessment a233e88
(2019-10-30). When I install an old version 631fe00
(2019-03-13) the plot looks fine.
I'm running R 3.6.2 in Debian 10.
The function stockassessment:::refit ignores the $keyXtraSd option
catchplot function shows the unscaled catches when catch multiplier is turned on.
better option would be to show both the scaled and unscaled values in that case.
Is it possible to have a catchtable function included in the package please, analogous to tsbtable?
catchtable <-
function (fit)
{
ret <- .tableit(fit, "logCatch", trans = exp)
return(ret)
}
Thanks for the useful package
retro function could maybe accept "par" as argument, and a "reduce" function could be made to work for par files as well. This would make the retro function work with fixed parameters (through map)
The recruitment vector is correlated with the other N's and F's, so the recruitment pool should be resampled as part of the final state before resampling recruitments with replacement for a given trajectory.
(Note: the effect is that the uncertainty is over-estimated slightly which might not be so bad given other simplifying assumptions)
Hi,
the stockasssessment::forecast function now returns a summary tables with quantiles for a stochastic forecast but this causes an error if you're projecting a stock with zero catch advice in any year, i.e.
forecast(fit, fval = c(0.8,0.6,0,0.2), ave.years=2017:2019, rec.years=2005:2019, splitLD=TRUE, nosim = 50001)
Error in quantile.default(x, c(0.5, 0.025, 0.975)) :
missing values and NaN's not allowed if 'na.rm' is FALSE
The transformation used on rho
(the correlation) is not the logit transformation. Also, having a function f
in a model with a parameter named f
makes the code confusing.
The function f
is defined here
https://github.com/fishfollower/SAM/blob/master/stockassessment/src/stockassessment.cpp#L34
Then it's used to transform logit_rho
on lines 123 and 132.
The transformation used here is a special case of the 4-parameter logistic; rename these accordingly.
Plots of multiple runs such as leaveout runs with long fleet names makes legend unreadable.
Possible solution: truncate names to a maximum number of characters that fits into a plot.
the size of the fitted object should be reduced (e.g. by optionally not storing the cov)
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.