Closed ejardim closed 10 years ago
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]]))
The problem is in the output of sca and a4aSCA. The second works ok. Will open another issue.
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]]))