Closed ejardim closed 10 years ago
a4aSCA works fine.
library(FLa4a) data(ple4) data(ple4.indices) fit <- sca(ple4, ple4.indices, fit="assessment") flqs <- predict(fit)
sfrac <- mean(range(ple4.indices[[1]])[c("startf", "endf")]) Z <- (m(ple4) + harvest(fit))_sfrac lst <- dimnames(fit@index[[1]]) lst$x <- stock.n(fit)_exp(-Z) stkn <- do.call("trim", lst) qhat <- index(fit)[[1]]/stkn all.equal(c(qhat), c(flqs$qmodel[[1]]))
Temporary fix. Colin's working on a better fix.
a4aSCA works fine.
library(FLa4a) data(ple4) data(ple4.indices) fit <- sca(ple4, ple4.indices, fit="assessment") flqs <- predict(fit)
sfrac <- mean(range(ple4.indices[[1]])[c("startf", "endf")]) Z <- (m(ple4) + harvest(fit))_sfrac lst <- dimnames(fit@index[[1]]) lst$x <- stock.n(fit)_exp(-Z) stkn <- do.call("trim", lst) qhat <- index(fit)[[1]]/stkn all.equal(c(qhat), c(flqs$qmodel[[1]]))