Individual and site-specific covariates in E-Surge

questions concerning analysis/theory using programs M-SURGE, E-SURGE and U-CARE

Individual and site-specific covariates in E-Surge

Postby tamarlok » Tue Jan 20, 2009 12:52 pm

Hello,

I am working on an analysis to assess the factors influencing wintering choice of spoonbills (and also subsequent wintering site fidelity). I am using a dataset of Spoonbills ringed in the Netherlands. As I am mainly interested in movements to and between wintering sites, I selected only birds that were observed at least once in the wintering area. I use 4 sites:
1 : Netherlands (birds are only ringed, and cannot be resighted anymore)
2 : France
3 : Iberia (Spain, Portugal, Marocco)
4 : Africa (Mauritania, Senegal)

In my data, survival in the Netherlands is 1, and movement probability from any site to the Netherlands is 0. I use the following design matrices:

Initial states:
* - - - (all birds are ringed in the Netherlands)

Transition matrices (divided up into a survival, fidelity and movement matrix, according to Grosbois & Tavecchia 2003, with minor adjustments)

Survival:
* - - - -
- s - - *
- - s - *
- - - s *
- - - - *
Survival in the Netherlands (prior to moving) is 1 (as all birds are at least once observed on their wintering site)

Fidelity:
* - - - - - - -
- f * - - - - -
- - - f * - - -
- - - - - f * -
- - - - - - - *
No birds are faithful to the Nethelands (they all move elsewhere to winter).

Movement:
- t t * -
- * - - -
- - t * -
- - * - -
- t - * -
- - - * -
- t * - -
- - - - *
The first row gives the probabilities of movements from the breeding to each wintering area; the other rows give probabilities of movements between wintering areas, given emigration.
No birds move back to the Netherlands (column 1 contains only 0's)

Event matrix:
* p - - -
* - p - -
* - - p -
* - - - p
* - - - -
Resighting probability in the Netherlands can be fixed either to 0 or to 1, this doesn’t matter, as movement probability to the Netherlands is already defined as being 0.

I have defined 3 age classes (age 1: between birth and 1st winter, age 2: between 1st and 2nd winter, age 3: everything after 2nd winter)
As a starting model, I am modelling constant survival, site * age variation in fidelity, and site.from*site.to variation in movement, and site variation in resighting probability.

I: i
S: i
F: f.a(2,3)
M: f
E: firste+nexte(1:3).f

My first question is: does this all seem OK?
Then I have two questions about how to proceed:
1) I want to incorporate an individual covariate in explaining movement from the breeding to the first wintering area: I have done this by changing M into:

f(1).to(2,3).[i + xind]+f(3,5,7)

I get a result, but in the output, the real parameters with their CI are not given anymore. I guess I have to calculate those myself (for a certain value of the individual covariate), but I don’t understand how the beta’s are listed (i.e., which beta’s I need to calculate the real parameters). Moreover, do I need to apply the Delta method to calculate the CI’s of the real parameters, using the var-cov matrix? Is there any reason why the real parameters are not calculated by default, for let’s say, the mean individual covariate value?

2) I want to incorporate the distance between the different sites in order to explain movements between sites (rather than modelling site.from*site.to to explain variation in movements). Is there any way to do this in E-Surge? I cannot find examples in the manual or the course material.

I hope you can help!

Kind regards,

Tamar Lok
tamarlok
 
Posts: 10
Joined: Wed Jan 24, 2007 8:19 am

Refining my 2nd question

Postby tamarlok » Thu Jan 22, 2009 11:47 am

To refine my 2nd question, I wrote below my attempt to model a site-specific covariate:

I tried to implement distance from the breeding grounds (NL) to the different wintering sites in affecting the probability to move to these wintering sites during the 1st winter. I made a text-file containing two covariates, with the standardized distances as the 1st covariate (these are the distance NL-F, NL-I, NL-A resp.)

2
3 17
-0.87 -0.21 1.09
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

I changed the GEMACO of the movement matrix into:

f(1).[i+to(2_4)*x(1)]+f(3,5,7)

which gave me all kinds of error messages (starting with "Undetermined error in GEMACO). Then I thought it could have something to do with the 3rd movement parameter (NL to A) calculated from the other 2.
So I modelled f(1).[i+to(2,3)*x(1)]+f(3,5,7) with only 2 distances in the covariate (NL-F and NL-I). This works! But how can I make the program take into account the distance of NL-A as well, and still making sure the movement probabilities sum up to 1? Or is this not possible?
tamarlok
 
Posts: 10
Joined: Wed Jan 24, 2007 8:19 am

Postby CHOQUET » Mon Jan 26, 2009 12:55 pm

Concerning,

I am working on an analysis to assess the factors influencing wintering choice of spoonbills (and also subsequent wintering site fidelity). I am using a dataset of Spoonbills ringed in the Netherlands. As I am mainly interested in movements to and between wintering sites, I selected only birds that were observed at least once in the wintering area. I use 4 sites:
1 : Netherlands (birds are only ringed, and cannot be resighted anymore)
2 : France
3 : Iberia (Spain, Portugal, Marocco)
4 : Africa (Mauritania, Senegal)

In my data, survival in the Netherlands is 1, and movement probability from any site to the Netherlands is 0. I use the following design matrices:

Initial states:
* - - - (all birds are ringed in the Netherlands)

Transition matrices (divided up into a survival, fidelity and movement matrix, according to Grosbois & Tavecchia 2003, with minor adjustments)

Survival:
* - - - -
- s - - *
- - s - *
- - - s *
- - - - *
Survival in the Netherlands (prior to moving) is 1 (as all birds are at least once observed on their wintering site)

Fidelity:
* - - - - - - -
- f * - - - - -
- - - f * - - -
- - - - - f * -
- - - - - - - *
No birds are faithful to the Nethelands (they all move elsewhere to winter).

Movement:
- t t * -
- * - - -
- - t * -
- - * - -
- t - * -
- - - * -
- t * - -
- - - - *
The first row gives the probabilities of movements from the breeding to each wintering area; the other rows give probabilities of movements between wintering areas, given emigration.
No birds move back to the Netherlands (column 1 contains only 0's)

Event matrix:
* p - - -
* - p - -
* - - p -
* - - - p
* - - - -
Resighting probability in the Netherlands can be fixed either to 0 or to 1, this doesn’t matter, as movement probability to the Netherlands is already defined as being 0.

I have defined 3 age classes (age 1: between birth and 1st winter, age 2: between 1st and 2nd winter, age 3: everything after 2nd winter)
As a starting model, I am modelling constant survival, site * age variation in fidelity, and site.from*site.to variation in movement, and site variation in resighting probability.

I: i
S: i
F: f.a(2,3)
M: f
E: firste+nexte(1:3).f

My first question is: does this all seem OK?

 It look fine exept that the sentence for step M must be f.to

Then I have two questions about how to proceed:
1) I want to incorporate an individual covariate in explaining movement from the breeding to the first wintering area: I have done this by changing M into:

f(1).to(2,3).[i + xind]+f(3,5,7)

I get a result, but in the output, the real parameters with their CI are not given anymore. I guess I have to calculate those myself (for a certain value of the individual covariate), but I don’t understand how the beta’s are listed (i.e., which beta’s I need to calculate the real parameters). Moreover, do I need to apply the Delta method to calculate the CI’s of the real parameters, using the var-cov matrix? Is there any reason why the real parameters are not calculated by default, for let’s say, the mean individual covariate value?

 The reason is that with individual covariates, there is a big amount oof output. To get an individual value, you have to use the delta method.
 Below is a script in Matlab (easily portable in R ) for the computation
of survival (i+xind(1,2,3) in Gemaco) for individual 1

%% Matrix of Variance-Covariance of mathematical parameters 1 to 4
A=[ 0.00472105 6.37793E-05 0.000948974 -0.001084087; ...
6.37793E-05 0.007454691 -0.001649798 0.00821715; ...
0.000948974 -0.001649798 0.00847571 -0.00641768; ...
-0.001084087 0.00821715 -0.00641768 0.020066974]
%% Vector of Weigth^0, Weigth^1, Weigth^2, Weigth^3 for individual 1 with history 10000000
w=[1 -0.8305 -0.2190 0.0969]
%% Vector of mathematical parameters
beta=[0.545722383; -0.003197205; -0.279027297; 0.250431933];
%% Computation of survival
expbeta=exp(w*beta);
phi=expbeta/(1+expbeta)
%% Computation of variance for survival
phi1unmoinsphi=phi*(1-phi);
U=phi1unmoinsphi1*(w)';
varphi=U'*A*U
%% Computation of CI for survival
CIphi=[ phi1-1.96*sqrt(varphi1), phi1+1.96*sqrt(varphi1)]


 There is however some difficulties related to your case.
1) to be able to get the position of the beta. In your case, the first beta is link to survival, the next 6 beta are link to fidelity. Next are the movement, Beta 7 is f(1).to(2), Beta 8 is f(1).to(3), Beta 9 is f(1).to(2).xind and Beta 10 is f(1).to(3).xind.
2) The multinomial logit : In the script, you should consider
W=[ 1 xind(i) 1 xind(i) ]
The computation of psi(1,2) as
Psi12=exp(beta(7)+beta(8)*xind(i))/(1+ exp(beta(7)+beta(8)*xind(i)+ exp(beta(9)+beta(10)*xind(i))
The computation of the gradient as
U=Psi12*(1-Psi12)*(w’)

2) I want to incorporate the distance between the different sites in order to explain movements between sites (rather than modelling site.from*site.to to explain variation in movements). Is there any way to do this in E-Surge? I cannot find examples in the manual or the course material.

To refine my 2nd question, I wrote below my attempt to model a site-specific covariate:

I tried to implement distance from the breeding grounds (NL) to the different wintering sites in affecting the probability to move to these wintering sites during the 1st winter. I made a text-file containing two covariates, with the standardized distances as the 1st covariate (these are the distance NL-F, NL-I, NL-A resp.)

2
3 17
-0.87 -0.21 1.09
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

I changed the GEMACO of the movement matrix into:

f(1).[i+to(2_4)*x(1)]+f(3,5,7)


which gave me all kinds of error messages (starting with "Undetermined error in GEMACO). Then I thought it could have something to do with the 3rd movement parameter (NL to A) calculated from the other 2.
So I modelled f(1).[i+to(2,3)*x(1)]+f(3,5,7) with only 2 distances in the covariate (NL-F and NL-I). This works! But how can I make the program take into account the distance of NL-A as well, and still making sure the movement probabilities sum

 The only way is to consider a classical two-steps process, survival and movement and then to set fidelity as the complementary.
CHOQUET
 
Posts: 212
Joined: Thu Nov 24, 2005 4:58 am
Location: CEFE, Montpellier, FRANCE.

Temporal covariate on fidelity

Postby tamarlok » Wed May 12, 2010 5:39 am

Dear Remi,

I am working on the same dataset of Spoonbills as described earlier in this post.
I am now trying to model the fidelity to France from the 1st to the 2nd winter (age 2, as age 1 is from birth to 1st winter) as a function of mean winter temperature.
To do so, I wrote in GEMACO:

f(2).a(2).[i+t*x(1)]+f(3,4).a(2)+f.a(3,4:17)

The temporal covariate x(1) contains 17 values. I have 18 occassions, but the very 1st occassion only contains birds in the Netherlands, where they are born, so the 1st interval is from NL to France. This means that fidelity to France is only estimated from occassion 2 up to occassion 18, and therefore contains 16 intervals. However, when I entered 16 values in the external covariates file, I got an error. Therefore, I assumed 17 values were required, but for the modelling, only the last 16 values would be used. Is this correct?

Assuming this GEMACO works correctly, I get strange output, with the real estimates of the age2-fidelity to France varying enormously and completely unrelated to the temperature values it should be based on. However, when looking at the beta estimates, I see only two beta's estimated for this fidelity (which seems correct). How is it possible that the real estimates are seemingly unrelated to the beta estimates? Am I doing something wrong or am I misunderstanding something? If you need the output file, just let me know!

Kind regards, Tamar
tamarlok
 
Posts: 10
Joined: Wed Jan 24, 2007 8:19 am

Re: Individual and site-specific covariates in E-Surge

Postby CHOQUET » Wed May 12, 2010 7:14 am

Hello Tamar,
yes, the output file could help.
Rémi
CHOQUET
 
Posts: 212
Joined: Thu Nov 24, 2005 4:58 am
Location: CEFE, Montpellier, FRANCE.


Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest