Help with mark() error message

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Help with mark() error message

Postby jCeradini » Tue Oct 21, 2014 10:19 am

Hi Folks,

I’m looking for advice on where to focus troubleshooting (which so far has not been fruitful) when receiving this error message in RMark. I get the message when trying unsuccessfully to run RDHuggins models with mark() or mark.wrapper():
Code: Select all
Error in if (link != parameters[[i]]$link) link = "Parm-Specific" :
  argument is of length zero
Error in mark(pema.proc, pema.ddl, model.parameters = list(S = S.dot,  :
  Misspecification of model or internal error in code


I am modeling 2 years of small mammal mark-recap data with RDHuggins. I have 16 grids that were trapped for 2 primary periods with 4 occasions in each period. The primary periods are within a year. In RMark terms: 0001000 in 2013 and 2014.

Snippet of my data:
Code: Select all
  ch      freq  season grid block type cover male ad_ave
10000000    1   2013 B1_NS    B1    N grass    0      1
01100111    1   2013 B2_IE    B2    I shrub    1      1
01000000    1   2013 B2_IE    B2    I shrub    0      0
00010000    1   2014 B4_IN    B4    I grass    0      1
10111111    1   2014 B2_IE    B2    I shrub    1      1
01011000    1   2014 B4_NN    B4    N grass    1      1


I get the above error with every model I’ve tried, but here’s one attempt:
Code: Select all
 # GammaPrime: not estimable with only 2 primary periods.
GammaDoublePrime.dot.fixed <- list(formula = ~1, fixed = 0)
S.yr <- list(formula = ~season)
p.yr <- list(formula = ~season, share=TRUE)
c.yr <- list(formula = ~season)

mark(pema.proc, pema.ddl, model.parameters = list(GammaDoublePrime = GammaDoublePrime.dot.fixed, S = S.yr, p = p.yr, c = c.yr))


I greatly appreciate any advice, and apologize in advance if I've overlooked a simple syntax error.
Thanks!
Joe
jCeradini
 
Posts: 74
Joined: Mon Oct 13, 2014 3:53 pm

Re: Help with mark() error message

Postby jlaake » Tue Oct 21, 2014 11:47 am

Joe-

I need to put a better error message in for this model. This has arisen before. The RdHuggins model requires 3 primary periods. I took your data and created a dummy 3rd primary occasion and it ran.

data=import.chdata("data.txt",header=T,field.types=c("n","f","f","f","f","f","n","n"))
dp=process.data(data,model="RDHuggins",groups=c("season","grid","block","type","cover"),
time.intervals=c(0,1,0,1,0,0,0))
ddl=make.design.data(dp)
mark(dp,ddl)

regards --jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Help with mark() error message

Postby jCeradini » Tue Oct 21, 2014 12:02 pm

Great to hear - thanks Jeff!

Regarding the dummy primary period:
1) you don't alter the capture histories, but simply add a 1 in time.intervals?
2) I still want a survival estimate for the 0001000 structure, and obviously don't want an estimate for the dummy pp - will that be a problem with: 0,1,0,1,0,0,0? If so, should I create "dummy capture occasions" and ad d the extra pp at the end: 0,0,0,1,0,0,0,1,0 and then ignore survival estimates between pp2 and pp3 (or set to zero)?

Thanks again,
Joe
jCeradini
 
Posts: 74
Joined: Mon Oct 13, 2014 3:53 pm

Re: Help with mark() error message

Postby jlaake » Tue Oct 21, 2014 12:05 pm

Sorry for the misunderstanding. I wasn't suggesting that you add the dummy value in. I was only doing to demonstrate that the model worked when it had the minimum number of primary periods. Not sure what your options are and others may be able to help.
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Help with mark() error message

Postby jCeradini » Tue Oct 21, 2014 12:22 pm

Ok - thanks for clarifying Jeff. I appreciate the help.

I would love advice from others on ways to deal with this. RMark RDHuggins requires 3 primary periods but I only have 2 pp. Can I still get reliable estimates if I "trick" RMark by adding a dummy occasion on the end of my capture histories and then adding an extra primary period in the time.intervals argument, which would go from 0,0,0,1,0,0,0 to 0,0,0,1,0,0,0,1,0 where, for the latter, the last 0 represents a dummy occasion?

I've run these data in MARK Huggins Robust Design with only 2 pp, but I have a lot of groups, making RMark more appealing.

Thanks!
Joe
jCeradini
 
Posts: 74
Joined: Mon Oct 13, 2014 3:53 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest