Cannot run a robust design capture-recapture model

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

Cannot run a robust design capture-recapture model

Postby ogimenez » Tue Aug 25, 2015 7:37 pm

Hi guys,

Congratulations on maintaining such a friendly forum, no need to say that your input is much useful to us, the users :D
I’m running into a frustrating problem myself. I’d like to fit capture-recapture models within a robust design framework. To do so, the ‘robust’ help file of the RMark package (?robust) is a very nice starting point. However, I cannot reproduce the example.
More precisely, when I run this code:

Code: Select all
library(RMark)
?robust
data(robust)

# Random emigration model, p=c varies by time and session, S by time
time.intervals=c(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0)
S.time=list(formula=~time)
p.time.session=list(formula=~-1+session:time,share=TRUE)
GammaDoublePrime.random=list(formula=~time,share=TRUE)
model.1=mark(data = robust, model = "Robust",
            time.intervals=time.intervals,
            model.parameters=list(S=S.time,
            GammaDoublePrime=GammaDoublePrime.random,p=p.time.session),threads=2)


I get the following error and warning messages in the R console (pardon My French...):

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]] :
le nombre d'objets à remplacer n'est pas multiple de la taille du remplacement
De plus : Warning message:
In grep("Effective sample size ", out, ignore.case = TRUE) :
la chaîne de caractères entrée 101 est incorrecte dans cet environnement linguistique


I also checked the output file, which gave complementary information on my problem:

INPUT --- group=1 f0 Session 1 rows=1 cols=1 Square ;

ERROR -- Type of input matrix: Ì, S, p, r, c, N, Nbar, Nstar, U, F, F', Gamma, Gamma', Gamma'', R, R', f, M, Lambda, Psi, pent, pi, Omega, a'', a', Theta, Theta', or Delta was not specified.’


Interestingly (or not), I get the same error message for all models of the ‘robust’ example, except for the Huggins emigration model (the last one) which works perfectly well.

I found on the archives of the RMark forum a problem similar to mine. It was posted by Sergi in November 2014 with the title ‘Problems with the new version 2.1.9’. The issue was solved by Jeff who found out that it was an issue of version. The results above were obtained with R version 3.2.2 and RMark 2.1.13. I’m using a Mac.

Apologies in advance if this is a naive question, any help would be appreciated.
Cheers,
Olivier
ogimenez
 
Posts: 2
Joined: Sun Aug 23, 2015 6:10 am

Re: Cannot run a robust design capture-recapture model

Postby jlaake » Tue Aug 25, 2015 8:33 pm

Get the newest version of Mark and the problem will go away. Awhile back Gary changed the pim name from N to f0. I can see RMark is using f0 and I am assuming your version of Mark is expecting N and it fails.
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Cannot run a robust design capture-recapture model

Postby ogimenez » Thu Aug 27, 2015 8:57 am

Of course, the new version of Mark! I should have thought about that myself :oops:
It all works fine now, thanks a lot Jeff, and sorry for the trouble.
Olivier
ogimenez
 
Posts: 2
Joined: Sun Aug 23, 2015 6:10 am


Return to RMark

Who is online

Users browsing this forum: No registered users and 3 guests