Help using Base SAS procedures

random and repeated terms in poisson/negbin mixed model

Reply
N/A
Posts: 0

random and repeated terms in poisson/negbin mixed model

Hi
I am analyzing count data which was collected during transects, in different fields, at different time periods. I want to use a mixed model in which I can have the transects within fields included as a random factor, as in some cases more than one transect is associated with a field. I also want to include the sampling rounds as a repeated measure.

Firstly I tried PROC GLIMMIX. I just included the random effect of transect within field. As my data is count data my models had much better measures of fit and overdispersion when i used dist=poisson, I think because my data contains many zeros it worked even better with dist=negbin. So it makes sense for me to include a distribution family.

proc glimmix data=xxx;
class round treatment field transect;
model y = round treatment round*treatment / dist=poisson;
random transect(field);
run;

The above model works fine and then I come unstuck trying to add in repeated=sampling round.
In GLIMMIX it seems that there is no repeated option so I would have to include it as a random effect when i do this (below) the model runs forever and I have to stop it.

proc glimmix data=xxx;
class round treatment field transect;
model y = round treatment round*treatment / dist=poisson;
random = round / type = AR(1) subject=subj;
random transect(field);
run;

If I use PROC MIXED I can add both the random and repeated statements but can't specify poisson or negative binomial errors so my AIC measure is really large.
Does anyone have any advice or suggestions on how to include repeated measures as a random factor in PROC GLIMMIX? I am wondering if the reason my PROC GLIMMIX model wont run with the repeated measure as a random statement is because my subject is wrong. At the moment it is 'subj' which is the count recorded from each transect in each field during each time period.

Any advice would be greatly appreciated!
Thankyou in advance
Claire
Super Contributor
Super Contributor
Posts: 3,174

Re: random and repeated terms in poisson/negbin mixed model

Posted in reply to deleted_user
Just a kind comment: for these forums, you need not post a particular query in multiple forums.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 115 views
  • 0 likes
  • 2 in conversation