BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
GeorgeTr
Calcite | Level 5

I am currently working on the analysis of animal behaviour (frequency and duration) in a 2 x 2 factorial design, on two days (d2 and d16). Behavioural frequencies were analysed with proc glimmix with a Poisson distribution and Log link function, and a multiplicative overdispersion parameter:

proc glimmix data=behav;
by Obs_Day;
class Batch Sanitary Diet;
model Fighting_Total_number	= Batch Sanitary|Diet / dist=Poisson link=log;
random _residual_;
lsmeans Batch Sanitary|Diet / pdiff;
run;

 

Durations were analysed with proc glimmix, with a binomial distribution and logit link function, and a multiplicative overdispersion parameter:

proc glimmix data = behav;
NLoptions Maxiter = 2000;
by Obs_Day;
class Batch Sanitary Diet;
model Fighting_Total_duration = Batch Sanitary|Diet / dist = binomial link = logit;
random _residual_ ;
lsmeans Batch Sanitary|Diet / pdiff;
run;

 

These are standard methods used by my department for such analyses. However, I was later told that because one treatment group had 0 incidences of a certain behaviour on d2, I cannot use proc glimmix. Is that so? If yes, what is the alternative?

 

I would appreciate any help from the community.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

If you have 0 instances of some behavior on d2, then I think you can still use GLIMMIX but you cannot estimate the interaction between SANITARY and DIET (this would be true using any modeling PROC).

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

If you have 0 instances of some behavior on d2, then I think you can still use GLIMMIX but you cannot estimate the interaction between SANITARY and DIET (this would be true using any modeling PROC).

--
Paige Miller
GeorgeTr
Calcite | Level 5

Maybe I should use a Tweedie distribution? From what I read in SAS support it might be a more fitting alternative to simple glimmix.

PaigeMiller
Diamond | Level 26

The problem is not that you are using the wrong PROC. The problem is not that you are using the wrong distribution.

 

The problem is that you cannot estimate an interaction if one of the combinations of SANITARY and DIET has no data points.

--
Paige Miller
SteveDenham
Jade | Level 19

Further, how can a duration be binomially distributed? Unless you are defining an incidence as a duration, such as behavior not seen --> duration=0, behavior seen -> 1.

 

But your issue is with the first analysis, and the problem is that the log of 0 is negative infinity, so folks say you can't analyze the results when you have a zero and a log link. There are alternatives, and you are part way there by picking a multiplicative overdispersion. Consider adding a small (say 1e-6) to every observation, and fitting a gamma distribution (although you can still fit a Poisson, let's just move to the continuous version rather than staying with the discrete version). That should address your model. It is harder to compare means except on the log scale. The ILINK option gives a ratio for the exponentiated difference of two means on the log scale, not the difference on the measured scale of two exponentiated estimates. I don't know if the %NLest macro would be appropriate here, but it certainly is appropriate for the Poisson distribution example. Perhaps @StatDave could chime in here on that approach.

 

SteveDenham

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 439 views
  • 4 likes
  • 3 in conversation