Individual heterogeneity in marked: error when re=T
Posted: Sat Nov 11, 2017 5:30 pm
Hello,
I recently started looking into the "marked" package to incorporate individual heterogeneity described by Gimenez and Choquet (2012). I am specifically interested in modeling individual heterogeneity in p (not so much in phi). Laake et al. (2013) states that this can be accomplished using use.admb=T and re=T. I also looked at a vignette on Dr. Laake's github site which provided some example code (which I use below). However, when I use the argument re=T I get the following error.
I am using marked v. 1.1.13 so could this be due to outdated code? I looked through several recent paper's to see if someone tried to use this feature in the last year or so but did not find any examples. When I remove re=T the crm() function works great. I apologize if I have missed something simple in the help documentation!
Also, I noticed that RMark has a model type "CJSRandom." Is this the Gimenez and Choquet (2012) individual heterogeneity model implemented in MARK?
Here is a subset of my data, code, and the results I get when not using re=T.
Thanks so much,
Javan
I recently started looking into the "marked" package to incorporate individual heterogeneity described by Gimenez and Choquet (2012). I am specifically interested in modeling individual heterogeneity in p (not so much in phi). Laake et al. (2013) states that this can be accomplished using use.admb=T and re=T. I also looked at a vignette on Dr. Laake's github site which provided some example code (which I use below). However, when I use the argument re=T I get the following error.
- Code: Select all
> admb.mod=crm(test.proc,test.ddl,hessian=T,
+ use.admb=TRUE,re=T,compile=TRUE)
Error in crm(test.proc, test.ddl, hessian = T, use.admb = TRUE, re = T, :
argument 5 matches multiple formal arguments
I am using marked v. 1.1.13 so could this be due to outdated code? I looked through several recent paper's to see if someone tried to use this feature in the last year or so but did not find any examples. When I remove re=T the crm() function works great. I apologize if I have missed something simple in the help documentation!
Also, I noticed that RMark has a model type "CJSRandom." Is this the Gimenez and Choquet (2012) individual heterogeneity model implemented in MARK?
Here is a subset of my data, code, and the results I get when not using re=T.
Thanks so much,
Javan
- Code: Select all
> head(CH)
ch
1 0000100010
2 1010000000
3 1000000000
4 1000000000
5 1000000000
6 1000000000
> test.proc=process.data(CH,model="cjs",begin.time=2010,
+ time.intervals=time_intervals,
+ accumulate = F)
> test.ddl=make.design.data(test.proc)
> admb.mod=crm(test.proc,test.ddl,hessian=T,
+ use.admb=TRUE,re=T,compile=TRUE)
> admb.mod=crm(test.proc,test.ddl,hessian=T,
+ use.admb=TRUE,compile=TRUE)
Fitting model
Computing initial parameter estimates
compiling with args: ' -r -s ' ...
compiling with args: ' -r -s ' ...
compile output:
*** Parse: cjsre.tpl tpl2rem cjsre xxglobal.tmp xxhtop.tmp header.tmp xxalloc1.tmp xxalloc2.tmp xxalloc3.tmp xxalloc4.tmp xxtopm.tmp xxalloc6.tmp 1 file(s) copied. tfile1 tfile2 tfile3 tfile4 1 file(s) copied. *** Compile: cjsre.cpp g++ -c -O3 -fpermissive -D_FILE_OFFSET_BITS=64 -I. -I"c:\admb\include" -I"c:\admb\contrib\include" -o cjsre.obj cjsre.cpp *** Linking: cjsre.obj g++ -static -o cjsre.exe cjsre.obj "c:\admb\lib\libadmb-contrib.a" Successfully built 'cjsre.exe'.
compile log:
running ADMB program
running compiled executable with args: ' '...
Run output:
Initial statistics: 2 variables; iteration 0; function evaluation 0; phase 1
Function value 8.5008029e+001; maximum gradient component mag -1.3375e+001
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 -0.98913 -1.3375e+001 | 2 -3.40120 -9.7059e+000 |
- final statistics:
2 variables; iteration 8; function evaluation 12
Function value 7.1552e+001; maximum gradient component mag 5.8981e-005
Exit code = 1; converg criter 1.0000e-004
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 1.21764 1.5981e-005 | 2 -3.35324 5.8981e-005 |
Estimating row 1 out of 2 for hessian
Estimating row 2 out of 2 for hessian
Elapsed time in minutes: 0.3133
> admb.mod$results$beta
$Phi
(Intercept)
1.21764
$p
(Intercept)
-3.35324