flr / FLa4a

The repository for the JRC initiative on stock assessment
https://fishreg.jrc.ec.europa.eu/web/a4a
12 stars 6 forks source link

nobs not well computed when iters exist ? #37

Closed ejardim closed 7 years ago

ejardim commented 10 years ago

stk2 <- ple4 idx2 <- ple4.index catch.n(stk2) <- genFLQuant(catch.n(stk2), 0.1, niter=nits) index(idx2) <- genFLQuant(index(fit0)[[1]], 0.1, niter=nits)

check iters match

fit <- a4aSCA(stk2, FLIndices(idx2)) fit0 <- a4aSCA(ple4, FLIndices(ple4.index)) Note: The following observations are treated as being missing at random: fleet year age BTS-Isis 1997 1 BTS-Isis 1997 2 Predictions will be made for missing observations. fitSumm(fit0) iters 1 nopar 1.20000e+02 nlogl 1.70697e+02 maxgrad 2.42845e-03 nobs 7.10000e+02 fitSumm(fit) iters 1 2 nopar 1.20000e+02 1.20000e+02 nlogl -2.42417e+02 -2.30977e+02 maxgrad 6.76072e-03 3.14076e-03 nobs 7.12000e+02 7.12000e+02

ejardim commented 7 years ago

Nope !! all well. The random generation of the idx2 adds data points to ages 1 and 2, which are missing in the ple4.index, as such adding two more observations.