what is the correct syntax for random effects in E-SURGE?

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

what is the correct syntax for random effects in E-SURGE?

Postby wisc88 » Wed Nov 08, 2017 4:48 am

I am trying to use E-SURGE to run a multi-event model with a fixed effect of time and a random effect of study area (Plot) on both steps of the transition (survival+transition). My model has 3 states, 7 events, 2 age classes and 8 occasions. Plot has 12 levels and all individuals are attributed to one Plot (i.e. there are no missing values).
I have successfully run models with Plot as a fixed effect (both t+Plot and t.Plot). Using individual as random effect (t+Plot+ind) also works fine. However, I cannot write the correct syntax to make GEMACO understand Plot as random.

I have tried the following phrases:
t+r(Plot) -> Call GEMACO does not work
t+random(Plot) -> Call GEMACO does not work
t+[i+r(Plot)] -> Call GEMACO works but I get errors when running the model

My E-SURGE version is 2.1.4.
Are these details enough to pinpoint my error?
Thank you for your help!
wisc88
 
Posts: 6
Joined: Mon Nov 06, 2017 11:35 am

Re: what is the correct syntax for random effects in E-SURGE

Postby simone77 » Thu Nov 30, 2017 10:35 am

Hi,

It could help knowing which error messages you get when you run the third phrase.
Did you try to run simpler model (e.g. [i+r(plot)]) to see if you get the same error messages? Sometimes GEMACO syntax may be a bit tricky and using slightly different syntax may solve problems. However, as in any other statistical model you may also have problems because of the amount of information you have (compared to the complexity of your model structure); for instance, have you checked how many individuals you have from each plot?

On the other hand, I wonder whether the model you are trying to run is very far from the "truth", sometimes I have had problems of convergence when I used a certain structure for a parameter that seemingly was not plausible for the data (what about the AIC and parameter identifiability of [t.plot] and [t+plot]?).
simone77
 
Posts: 144
Joined: Mon Aug 10, 2009 2:52 pm

Re: what is the correct syntax for random effects in E-SURGE

Postby wisc88 » Fri Dec 01, 2017 11:54 am

Hello simone77, thank you for your reply.

simone77 wrote:have you checked how many individuals you have from each plot?

I think the number of individuals in each plot is reasonable for a random effect:
plot = p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21
n = 84 73 84 84 62 63 96 64 56 108 81 87

simone77 wrote:It could help knowing which error messages you get when you run the third phrase.Did you try to run simpler model (e.g. [i+r(plot)]) to see if you get the same error messages?

For some reason I am now able to call GEMACO on all three sentences I wrote before. However, I still get the following error when I try to run them or the model you suggested [i+r(Plot)]:

"Not enough input arguments.
Error in modme/F1_age_evt_al (line 32)
Error in modme/f_age_al (line 20)
Error in menumuse>Run_Callback (line 1775)
Error in gui_mainfcn (line 95)
Error in menumuse (line 46)
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)menumuse('Run_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback"

Nothing changes if I write an equal sentence for survival and transition or if I keep one of them constant with the random effect only in the other.

The beta parameters that appear in IVFV seem ok. There is one(or two) beta with "al." after the betas for the fixed effects.

simone77 wrote:On the other hand, I wonder whether the model you are trying to run is very far from the "truth", sometimes I have had problems of convergence when I used a certain structure for a parameter that seemingly was not plausible for the data (what about the AIC and parameter identifiability of [t.plot] and [t+plot]?).

I had run [t.Plot] for survival and transition just as a way to try to find the problem. I know the amount of data I have is not enough to estimate well the huge number of parameters. This is actually the reason why I wanted Plot as a random effect in the first place! The model [t.Plot] converges, but with 13 possibly redundant parameters. The estimated rank equals the number of mathematical parameters (176).

Any ideas?
___
Uschi
wisc88
 
Posts: 6
Joined: Mon Nov 06, 2017 11:35 am

Re: what is the correct syntax for random effects in E-SURGE

Postby simone77 » Sun Dec 03, 2017 6:15 pm

Hi Uschi,

That error message in MATLAB (that runs beyond E-SURGE) pops out when a function does not contain the arguments it needs. Maybe that it helps if you write here the complete GEMACO phrases you have used for each parameter.
Also, how did you load “plot” when doing the covariate selection? As a Cluster or as a Group? Are there other covariates you have selected? How is “plot” defined in your data (e.g. in headed format: $COV:plot)?
I cannot see any obvious error in that sentence alone, it is likely that a more complete picture may help to figure out where the problem comes from.
simone77
 
Posts: 144
Joined: Mon Aug 10, 2009 2:52 pm

Re: what is the correct syntax for random effects in E-SURGE

Postby wisc88 » Mon Dec 04, 2017 3:53 pm

Hi Simone,
I am fitting a model with the structure described in <Culina et al. (2013): A multievent approach to estimating pair fidelity and heterogeneity in state transitions. Ecol. Evol. 3(13):4326–4338. DOI: 10.1002/ece3.729.>.
Briefly, it has one step for initial state, one for survival, one for transition and 3 for capture. I have 3 underlying states and 7 observable events. The sentences and matrices are:

-------- INITIAL -------------
to

i *

--------- TRANSITION --------
---survival---
i+r(Plot)

s - *
- s *
- - *

---transition---
i

t * -
t * -
- - *

---------- CAPTURE -----------
---step 1---
firste+nexte

* - - p -
- * - - p
- - * - -

---step 2---
firste.to(4 5,6)+nexte.to(4 5, 6)

* - - - - - - -
- * - - - - - -
- - * - - - - -
- - - c - c * -
- - - - c c - *

---step 3---
firste.from(8)+nexte.from(8)+from(2,3)

* - - - - - -
* - - - - - l
* - - - - - l
- * - - - - -
- - * - - - -
- - - * - - -
- - - - - * -
- - - - * l -

I have loaded Plot as a group. E-SURGE did not give me an option to load Plot as Cluster, maybe because it has less than 50 levels?
I have used the headed format with the column name $COV:Plot.
I have another categorical covariate (age, 2 levels) and 5 linear covariates.
I have created a shortcut for Plot as: g(1 2,3 4,5 6,7 8,9 10,11 12,13 14,15 16,17 18,19 20,21 22,23 24)

Does this information give you any clue?
wisc88
 
Posts: 6
Joined: Mon Nov 06, 2017 11:35 am

Re: what is the correct syntax for random effects in E-SURGE

Postby simone77 » Mon Dec 04, 2017 6:59 pm

Hi Uschi,

I cannot see anything weird in your GEPAT and GEMACO. Also, I think you are right that you have not the option to load Plot as a cluster because it has less than 50 levels. I am just not sure to understand well about the shortcut you say you created. Did you create the shortcut or did E-SURGE automatically create it for you (by combining the two-levels variable "age" and the 12-levels variable "Plot")? I have to ask just in case but I am pretty confident that you meant the second (E-SURGE did all the job) and that "age" is, therefore, g(1 3 5 7 9 11 13 15 17 19 21 23, 2 4 6 8 10 12 14 16 18 20 22 24).

Did you check wether you have individuals for all the combinations plot x age? I mean that, for instance, you have not zero individuals of a certain age in a certain plot. However, it is true that you are not using "age" in the phrase with the random effect so that it should not be a problem...actually it is difficult to figure out something without handling the data. I am sorry, I hope that others can give their contribution here.
Good luck!
simone77
 
Posts: 144
Joined: Mon Aug 10, 2009 2:52 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest

cron