time-varying individual covariates with known fate models

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

time-varying individual covariates with known fate models

Postby BarbaraBV » Wed Dec 06, 2017 3:12 pm

Hi, I try to test the effect of the normalized difference vegetation index (ndvi) on survival of migratory caribou for different seasons of activity. All caribou are equiped with radio-telemetry. I am working with 12 years of data and I built an inp file for each different season. Each year I have 3 different numeric time-varying individual covariates.
That's a small part of the data after importation in Rmark.

Code: Select all
                             ch freq   jn1  jl1    p1   jn2   jl2    p2    jn3   jl3    p3
 2004001  000000000010101000000000    1 0.058 0.23 0.255 0.146 0.335 0.114 -0.025 0.233 0.292
 2004002  000000000010101010100000    1 0.058 0.23 0.255 0.146 0.335 0.114 -0.025 0.233 0.292
 2004004  000000000010101000000000    1 0.058 0.23 0.255 0.146 0.335 0.114 -0.025 0.233 0.292
 2005002  000000000010101010101100    1 0.058 0.23 0.255 0.146 0.335 0.114 -0.025 0.233 0.292
 2005004  000000000010101000000000    1 0.058 0.23 0.255 0.146 0.335 0.114 -0.025 0.233 0.292
 2005005  000000000010001010100000    1 0.058 0.23 0.255 0.146 0.335 0.114 -0.025 0.233 0.292
...


I follow the indication I found on the appendixC - chapter 16 on individuals covariates and I named each covariate as a concatenation of the variable and the time occasion.
For example I have 12 years so time occasion going to 1 to 12 and the first covariate is named "jn1", "jn2", ..., "jn12". So I expected to be able to build models like :

Code: Select all
S.time_JN=list(formula=~time:jn)


But Rmark reject it and send me these error-messages :

Error in make.mark.model(data.proc, title = title, parameters = model.parameters, :

Error: Variable jn used in formula is not defined in data

Error in mark(model.parameters = model.parameters, initial = initial, :
Misspecification of model or internal error in code


What I understand is that I've been unable to insert these covariates in the design data even if when I imported the data I specify that those were covariates. I also see them in the output of the structure of the process.data.
But I don't understand where I made a mistake. Is it possible to test the effect of a non factoriel time-variable covariates with known-fate models ? I couldn't find similar example of what I'm trying to do.

Could you help me ? If you need more information about my script or the data base, just let me know. Thank you.

Barbara
BarbaraBV
 
Posts: 1
Joined: Thu Jul 13, 2017 1:44 pm

Re: time-varying individual covariates with known fate model

Postby jlaake » Thu Dec 07, 2017 9:14 am

Make sure the data in the processed data list (created by process.data) contains those fields. Also did you set a begin.time value. Make sure the times in the design data for S are 1 to 12.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 12 guests