BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Just a kind comment: for these forums, you need not post a particular query in multiple forums.

Scott Barry
SBBWorks, Inc.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 856 views
  • 0 likes
  • 2 in conversation