My code is:

- Code: Select all
`# stratification`

CH_strat <- stratify(list(CH_M2019, CH_M2020, CH_M2021, CH_TI2019, CH_TI2020, CH_TI2021), intervals = list(int_M2019, int_M2020, int_M2021, int_TI2019, int_TI2020, int_TI2021), bytraps=T)

# model building

JSSA1 <- openCR.fit(CH_strat, type = 'JSSAbCL', model = list(phi~1, p~1, b~stratum*sex), distribution="binomial", stratified=TRUE)

# inference

JSSA1

The code leads to the following output:

[...]

Variance-covariance matrix of beta parameters

p phi b

p 0.01141 -0.01721 0.00777

phi -0.01721 0.08037 -0.01990

b 0.00777 -0.01990 0.05438

Fitted (real) parameters evaluated at base levels of covariates

Error in matrix(x, nrow = nsess[j]) :

invalid 'nrow' value (too large or NA)

In addition: Warning message:

In matrix(x, nrow = nsess[j]) :

data length [15] is not a sub-multiple or multiple of the number of rows [19]

I can't figure out, what causes the problem and I'd be very happy to hear your ideas/experiences.