I am trying to estimate the affects of open river (OR) conditions on apparent survival and transition probabilities for a group of tagged fish (n = 191). I have calculated the total number of open river days and have an estimate for each state of the 8 states during all 48 time periods. So, my resulting data frame with the ch, sex, total length, and each of the OR estimates is 191 by 387.
Below is the code that I have tried ... I was modifying code found in the marked vignette.
- Code: Select all
pdfh4 <- cbind(pdfh1, pdfh3) # Data frame with ch and newly named OR columns
pdfh4.proc <- process.data(pdfh4, model = "Multistrata") # Process the data
design.S <- list(time.varying = c("OR"))
design.Psi <- list(time.varying = c("OR"))
design.parameters <- list(S = design.S, Psi = design.Psi)
ddl <- make.design.data(pdfh4.proc, parameters = design.parameters)
names(ddl$S)
names(ddl$Psi)
model.parameters <- list(Psi = list(formula = ~ OR),
S = list(formula = ~ OR))
MCMCfit <- crm(pdfh4, model = "probitCJS",
model.parameters = model.parameters,
burnin = 1000, iter = 5000)
And this is the error that I am getting when I run the above model:
- Code: Select all
Error in process.data(data, begin.time = begin.time, model = model, mixtures = 1, :
Incorrect ch values in data:0GHFEBACD
Any help or suggestions would be greatly appreciated!! I can provide additional code or files if needed.
Thank you,
Katie