Programming the statistical procedures from SAS

Proc glimmix, modelling repeated measures using the random statement, how?

Reply
Occasional Contributor
Posts: 15

Proc glimmix, modelling repeated measures using the random statement, how?

Hi all,

I am trying to model the following data in SAS using proc glimmix and i would like feedback if i have modelled my data correctly.

My data consist of individual chickens (ID) who are grouped by treatment in the enclosure they occupy (chickens receiving different treatments are kept in the same enclosure). I want to know if treatment influences if they appear at popholes present in their enclosure (registered, in which '1' describes an event). Furthermore if two weather variables (Factor1, Factor2 , averages per day) may influence this appearance. Repeated measurements (measured once a day) have been taken of the same individual chickens over a course of days (Date).

In total about 480 chickens subdivided in 6 treatments have been followed over a period of 26 days.

I have attempted the following model but i am unsure if it is correct since I am new to using both proc glimmix and sas.

proc glimmix data=chicken;

class date id treatment;

model registered (event='1') = treatment|factor1 |factor 2 / link=logit dist=binomial solution;

random intercept/ subject=id(treatment);

random date/subject= ID(treatment) residual;

Lsmeans treatment/pdiff;

run ;

I have tried to model the repeated nature of the experiment by using random date/subject= ID(treatment) residual; and this model gives an output which states that only factor2 and factor1*factor2 have a significant effect (type 3 test). The outcome feels right as individual chickens are treated as individual subjects with  the correct number of observations per subject and the model is not overdispersed.

G-side Cov. Parameters1
R-side Cov. Parameters1
Columns in X28
Columns in Z per Subject1
Subjects (Blocks in V)485
Max Obs per Subject26

However I believe i should include date and id also in the model statement. Must the factor specified in the random residual statement be included in the model statement? Because, if i do this using the most simple model model registered (event='1') = treatment date factor1  factor 2  id / link=logit dist=binomial solution; , the model  does not converge, not even when pconv=1e-4 or when i sorted the model to ID or registered.   Excluding ID had had the effect that the factor date takes shows an effect of day however,   factor1 and factor 2 (which have different means per day) are not provided with further output (only a - where a value should be). While excluding date results in a model which will not converge even if pconv=1e-4.

Hopefully someone can provide some feedback,

Mariëlle

Respected Advisor
Posts: 2,655

Re: Proc glimmix, modelling repeated measures using the random statement, how?

See my reply in the SAS Procedures forum.

Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 198 views
  • 1 like
  • 2 in conversation