BookmarkSubscribeRSS Feed
mgerritsen
Calcite | Level 5

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

1 REPLY 1
SteveDenham
Jade | Level 19

See my reply in the SAS Procedures forum.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1318 views
  • 1 like
  • 2 in conversation