I'm studying sex-specific survival in snowy plover chicks and I'm having a few problems in RMARK while using Burnham's Joint Live and Dead Encounters model with encounter histories that include "dot notation".
To introduce you to my study system, plover chicks are brooded for 27 days since hatch, after which they fledge. Thus, my dataset has 27 encounter occasions that represent each day of a chick's life. Each chick has one of three fates: 1) dead (i.e., known death before fledging), 2) fledged (i.e., made it past 27 days), or 3) unknown. Because of the "joint" nature of these fates in my data, I figured that Burnham's Joint Live and Dead Encounters model would be most appropriate since it would utilize as much fate information as possible to produce the most precise parameter estimates. As such, I coded my data according to the standard LD format. With 27 encounter occasions, there are thus a total of 54 characters in the LD capture history string of each individual.
To give you a taste of my data, here are the first 20 rows (i.e., individuals) of the LD dataframe in R (Note: the first column is the LD capture history string for each individual, and the second column is the sex of each individual):
- Code: Select all
> plover[c(1:20),]
ch Sex
10..001010000010..000010101000100000101000..1000001010 M
10..001010000010..000010101000100000101000..1000001010 M
10..001010000010..000010101000100000101000..1000001010 F
..10101000..10..10101010101010101010101000101000000010 F
..10101000..10..10101010101010101010101000101000000010 F
1010..10..10001010101010101000100000001000000010000010 M
1010..10..10101010100000101000101000100000101010001010 F
1010..01..00000000000000000000000000000000000000000000 M
0010..10..10001010101010101000100000001000000010000010 M
100010101000..............................00..00..0001 M
001010101000..10..10100010100010........01....00000000 F
001010101000..10..10100010100001..............00000000 F
001001000000..00..00000000000000..............00000000 M
100010100100..0000000000..00..0000..0000....0000000000 M
100000100000..0001000000..00..0000..0000....0000000000 F
100010100100..0000000000..00..0000..0000....0000000000 M
1000101010010000000000000000000000000000..000000..00.. M
1000101010010000000000000000000000000000..000000..00.. M
101000100010010000000000..0000000000000000000000000000 F
101000101010100010101000..1010000010000000100010001010 F
At first glance, you may be wondering "what the heck are those dots in the capture history?" The simple answer is that a ".." codes for a day (in LD format) in which there was no survey conducted, and thus it was not possible to resight (or sight) a chick. I coded the capture history this way to acknowledge the fact that days in which a survey was not conducted vs. days in which a survey was done but the chick was not detected are not the same. If these two cases were coded the same in the capture history (i.e., with a "0"), then the resight history would be negatively biased and the precision of the survival estimate would be reduced. This is simply my intuition, but I welcome your thoughts and expertise about this issue.
After reading the data into R, I then followed the standard RMARK pipeline by first processing the data via specifying the "Burnham" model and defining the "Sex" variable as a group:
- Code: Select all
plover.proc <- process.data(plover, model = "Burnham", groups = c("Sex"))
Then I created the design matrix:
- Code: Select all
plover.ddl <- make.design.data(plover.proc)
Then I tested a simple model (S(~Sex)p(~1)r(~1)F(~1)) to see if the data were being properly read:
- Code: Select all
S.sex <- list(formula=~Sex) # S(sex)
p.dot <- list(formula=~1) # p(.)
F.dot <- list(formula=~1) # F(.)
r.dot <- list(formula=~1) # r(.)
Simple.model <- mark(data = plover.proc,
ddl = plover.ddl,
model.parameters = list(S = S.sex, p = p.dot, F = F.dot, r = r.dot),
invisible = FALSE, model = "Burnham")
However, when I ran this simple model, I got the following error message:
- Code: Select all
STOP ERROR
MARK did not run properly. If error message was not shown, re-run MARK with invisible=FALSE
Model output is not available
Error in wtable[i, cols] = real[pim[i, cols]] :
number of items to replace is not a multiple of replacement length
Does anyone have any ideas what this error message could be referring to or how to solve this problem? My gut feeling is that RMARK doesn't like that I've used the dot notation in my capture history. However, I tried these same data (but in LL data format) in a classic CJS model in RMARK using very similar code and it worked just fine. Could it be that the Burnham model doesn't recognise dots in the capture history?
Your help is greatly appreciated!
Cheers,
Luke