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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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