Coder Social home page Coder Social logo

flxsa's Introduction

FLXSA

Overview

FLXSA provides the framework to perform eXtended Survivor Analysis in FLR.

To install this package, start R and enter:

install.packages("FLXSA", repos="http://flr-project.org/R")

Documentation

Build Status

Travis Build Status AppVeyor Build Status

Releases

License

Copyright (c) 2004-2022 The FLR Team. Released under the GPL v2.

Contact

You are welcome to:

flxsa's People

Contributors

ejardim avatar iagomosqueira avatar lauriekell avatar niknikos avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flxsa's Issues

Error in h(simpleError(msg, call)) : error in evaluating the argument 'X' in selecting a method for function 'lapply': negative length vectors are not allowed

Tried to run FLXSA function but getting error

FLXSA.control.aa <- FLXSA.control(x=NULL, tol=1e-09, maxit=30, min.nse=0.3, fse=0.5, rage=1, qage=3, shk.n=TRUE, shk.f=TRUE, shk.yrs=2, shk.ages=2,window=100, tsrange=20, tspower=3, vpa=FALSE)

aa.xsa <- FLXSA(aa.stk, aa.idx, FLXSA.control.aa)

Error in h(simpleError(msg, call)) :
error in evaluating the argument 'X' in selecting a method for function 'lapply': negative length vectors are not allowed

Error in SSB calculation

Hi!
I am currently trying to apply the XSA to one of ICES redfish stocks. I thought I followed the tutorial, however now the XSA values for SSB look rather unreasonable. So far I have uploaded my data, converted it to an FLStock object and defined the range, m, m.spwn and maturity at age. Afterwards I computed landings, discards and catch.

After running the XSA with a survey index and the default xsa.control, calculations for F and recruits seem reasonable, while SSB is given from 3.8 million to Inf.
I checked the input/output for stock.n, mat, and mean weight, seeing as these parameters are needed for the calculation, but they seem ok. The only parameter that is not calculated is ’stock’. I am not sure exactly why that is, or if it even is relevant for the calculation of SSB.

I’d be very grateful for any help on the matter!

Missing phenotype value

Hi, I would like to ask what to do if I have missing phenotype values? What does the phenotype file use to represent, is it NA or 0 or is it empty?

SE of q.hat reported incorrectly in diagnostics() function

the diagnostics function calculates the se of the log q as follows:

 S.E_Logq = round(c(sd(matrix([email protected][[f]], 
                  dim([email protected][[f]])[2], dim([email protected][[f]])[1], 
                  byrow = T), na.rm = T)), 4)

It therefore assumes the se is the same for all ages, when you look at the old VPA95 output, you get different se estimates for each age. You can replicate this by simply doing this:

apply([email protected][[f]],1,sd)

presumably this is a bug in the diagnostics function

XSA exception in Rstudio 1.2.xx version

Hello. If you try to perform typical XSA in new version FLXSA package with Rstudio 1.2.xx then you will got error:

Error in lapply(assess@index, FLQuant) : 
  negative length vectors are not allowed

You can simply reproduce this bug with test data (ple4):

data(ple4)
data(ple4.indices)
test <- FLXSA(ple4, ple4.indices)

Is there any solution exist or i should rollback to previous version? Problem occured only in Windows OS and Rstudio 1.2.xx or newst.

UPD: another members in comments found problem source in flxsa.R in fqs() function in lapply() calling from res <-fqs(.Call("runFLXSA", stock, indices, control, diag.flag))

Error in h(simpleError(msg, call)) : error in evaluating the argument 'data' in selecting a method for function 'bubbles': unable to find an inherited method for function ‘index.res’ for signature ‘"FLStock"’

Hi,

I tried to run a FLXSA but I had an error in the residuals function:

Model: xsa_control <- FLXSA.control(x=NULL, tol=1e-09, maxit=150, min.nse=0.3, fse=1.5,
rage=0, qage=2, shk.n=TRUE, shk.f=TRUE, shk.yrs=3, shk.ages=2,
window=100, tsrange=20, tspower=0, vpa=FALSE)

Log Residuals

ttl <- list(label="Log residuals for surveys for Parapenaeus longirostris in GSA 5", cex=1)
yttl <- list(label="log residuals", cex=0.8)
xttl <- list(cex=0.8)
stripttl <- list(cex=0.8)
ax <- list(cex=0.7)
par(mfrow=c(1,3))
bubbles(age~year, data=index.res(stk.xsa)[1,], bub.scale=5,
main=ttl, ylab=yttl, xlab=xttl, scales=ax, par.strip.text=stripttl)

And here it appears the error:
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'data' in selecting a method for function 'bubbles': unable to find an inherited method for function ‘index.res’ for signature ‘"FLStock"’

Besides, for the same model I had another error in the "diagnostics" function using the FLEDA package:

diagnostics(stk.xsa)

And it appear the error: "Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘diagnostics’ for signature ‘"FLStock"’

Does anybody knows what can be happeing?

Thanks

Failed to install on Ubuntu

Hi,

I try to install FLXSA on Ubuntu:
/usr/lib/R/etc/Makeconf:168: recipe for target 'fl__vpa.o' failed
make: *** [fl__vpa.o] Error 1
ERROR: compilation failed for package ‘FLXSA’

  • removing ‘/home/george/R/x86_64-pc-linux-gnu-library/3.4/FLXSA’
    Warning in install.packages :
    installation of package ‘/home/george/Downloads/FLXSA_2.5.tar.gz’ had non-zero exit status

Maybe do you have any idea.

Cheers !
George

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.