Programming the statistical procedures from SAS

Nested random effects in a Hurdle model

Reply
N/A
Posts: 0

Nested random effects in a Hurdle model

Hello,

I have read some papers about including a random effect in a hurdle model, but none about including nested random effects, and would like to know if this is possible.
I have made census in 4 transects, with 20 fields inside each transect. I think using the glimmix procedure the code for the random effects would be:

random transects fields(transects)

But I don't know how to translate this into the hurdle model with the NLMIXED procedure. This is the nearest code I have for this (with only one random effect):

proc nlmixed data=sasuser.hydra_glm_enteros;
parms a0=0 a1=0
b0=0 b1=0
s=1;
eta0 = a0 + a1 * estad_a + u1;
exp_eta0 = exp(eta0);
p0 = exp_eta0 / (1 + exp_eta0);

etap = b0 + b1 * estad_a + u1;
exp_etap = exp(etap);

if rec_avo = 0 then ll = log(p0);
else ll = log(1 - p0) - exp_etap + ard_cin * etap - lgamma(ard_cin + 1)
- log(1 - exp(-exp_etap));
model rec_avo ~ general(ll);
random u1 ~ normal(0,s) subject= transect;
run;

I would appreciate very much any answer.

Thanks,

Grego.
Ask a Question
Discussion stats
  • 0 replies
  • 46 views
  • 0 likes
  • 1 in conversation