Too much parameters:Error with integer read of 1e+05

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

Too much parameters:Error with integer read of 1e+05

Postby scha » Wed Jun 18, 2014 10:48 am

Dear all,

I have a problem that occurs before running models with RMark, during the PIM structures are compiled.

I wish to run multi-state models with dead recovery (more precisely a 'known fate model') which is normaly quite easy to do thanks to RMark. I try to estimate a weekly survival of birds after they are release in the wild. These birds were monitored by GPS during 72 weeks. To estimate weekly survivals, I made encounter histories which looks like that (here for one bird) :

000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0B0B0B0B0B0C0C0C0C0C0C0C0B0B0B0B0B0B0B0B0B0B0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0B0C0C0C0C0C0C0C0C0C0C100;

In my model, I have four parameters to estimate :
S: survival
p: capture probability, fixed to 1
Psi :transition probability between 4 types of habitat suitability (A,B,C,D)
r : recovery rate, supposed to be constant

I have a problem, even when I fit a constant estimate for all parameters. This problem occur during the build of Psi triangular matrix. Indeed, the triangular matrices of Psi assume each real parameters for each triangular matrix to be unique. In my case, this number exceed 100000 and 'mark' or 'Rmark' transform this number into 1E+05

Then I have this error :

ERROR -- Error with integer read of 1e+05
STOP ERROR
Error in extract.mark.output(out, model, adjust, realvcv, vcvfile) :
MARK did not run properly. If error message was not shown, re-run MARK with invisible=FALSE


This problem does not occur for 1000 or 10000.I tried to use the arguments ' remove.unused =TRUE' with make.design.data function but this lead to an other and more obscur error
Error in pim[[i]][[1]]



Is someone has already experienced this problem and has found a solution

Thanks in advance for the reply

Stephane
scha
 
Posts: 26
Joined: Tue Oct 11, 2011 8:27 am
Location: MNHN : Muséum National d'Histoire Naturelle, Paris, France

Re: Too much parameters:Error with integer read of 1e+05

Postby jlaake » Wed Jun 18, 2014 10:55 am

This is controlled with options(scipen=) in R. Set that to a bigger number and it will work. See example below:

Code: Select all
> 100000
[1] 1e+05
> options(scipen=10)
> 100000
[1] 100000
>
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Too much parameters:Error with integer read of 1e+05

Postby scha » Wed Jun 18, 2014 11:11 am

Yeah it works, many thanks Jeff for this rapid and ffective answer

BUT I have an another error of memory this time

* * WARNING * * Error number 5014 from memory allocation of VCRMAT.

* * WARNING * * Attempt to allocate an allocated object

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x6DBD9D in _gfortrani_backtrace
#1 0x6C61C0 in _gfortrani_backtrace_handler
#2 0x7F32214D622F
#3 0x7F3221522A76
#4 0x5C421B in estmat_
#5 0x62B21C in MAIN__ at mark.f90:0
Segmentation fault


Do you thinkk that it is also a problem with R?

Note that mark give me result of deviance and AIC so the calcul of logistic regression seems to work

Effective Sample Size = 1563
{ S(~1)p(~1)Psi(~1)r(~1) } Iteration 11 Time for numerical optimization was 2.08 seconds.
-2logL { S(~1)p(~1)Psi(~1)r(~1) } = 23189.226
Penalty { S(~1)p(~1)Psi(~1)r(~1) } = -0.0000000
Gradient { S(~1)p(~1)Psi(~1)r(~1) }:
-0.2387431E-03 0.1690437E-03 0.1566491E-03
{ S(~1)p(~1)Psi(~1)r(~1) } VC Matrix: 67% done. Time to compute number of parameters was 0.81 seconds.
DEVIANCE { S(~1)p(~1)Psi(~1)r(~1) } = 23189.226
DEVIANCE Degrees of Freedom { S(~1)p(~1)Psi(~1)r(~1) } = 549
c-hat { S(~1)p(~1)Psi(~1)r(~1) } = 42.239028
AIC { S(~1)p(~1)Psi(~1)r(~1) } = 23195.226
AICc { S(~1)p(~1)Psi(~1)r(~1) } = 23195.242
BIC { S(~1)p(~1)Psi(~1)r(~1) } = 23211.290


Do you have another brillant idea to solve this problem?


Stephane
scha
 
Posts: 26
Joined: Tue Oct 11, 2011 8:27 am
Location: MNHN : Muséum National d'Histoire Naturelle, Paris, France

Re: Too much parameters:Error with integer read of 1e+05

Postby scha » Wed Jun 18, 2014 11:39 am

Sorry I ask for memory problem too quickly

The problem was already mention (with some solutions to try) in an other thread

viewtopic.php?f=21&t=2741&p=8717&hilit=memory+allocation+of+VCRMAT#p8717

Stéphane
scha
 
Posts: 26
Joined: Tue Oct 11, 2011 8:27 am
Location: MNHN : Muséum National d'Histoire Naturelle, Paris, France


Return to RMark

Who is online

Users browsing this forum: Bing [Bot] and 1 guest