Programming the statistical procedures from SAS


New Contributor
Posts: 2


I may have a difficult question. 


I have conducted an observational study in the behaviour of chimpanzees. There were three groups (of 4, 6 and 7 animals) which each received a different type of intervention (Control, I1, I2). They were observed during a  baseline and intervention period. Data were non-parametric. I wanted to known whether there was an effect for the interaction 'intervention x period'. My supervisor gave me the instructions as to how I had to program SAS, but actually I had no idea what it all meant at the time. 


I am not great in statistics and after a lot of research, I am still not confident of what I did. Now, I have to write my Materials & Methods, and I want to properly describe the statistic procedures I have done and why. Can anyone assist me?


These are the instructions I was given:


Proc glimmix data=dataset;

class chimp group intervention period;

model behaviour x = intervention x period intervention period / link=logit dist=binomial ddfm=kr;

random intercept / subject=chimp(group) type=chol;

lsmeans intervention x period intervention period/pdiff adjust=bon;

lsmeans intervention x period intervention period/cl ilink;




Respected Advisor
Posts: 5,049

Re: Help

What code did you actually run? What was is supposed to test, according to your supervisor?

New Contributor
Posts: 2

Re: Help

Thanks for your fast reply, PG


It was supposed to test whether there were significant changes in behaviour in each group between the baseline and intervention period.


I did not receive explanations why the GLIMMIX procedure was most fitted for the analysis, but I guess it is because the data were non-parametric, it involved repeated measures, there were differences in sample sizes (4, 6 and 7 animals) and because not every subject was observed equally often, and the length in baseline and intervention periods differed. 


This is the code I actually run: 


data dataset;

set dataset;


Proc univariate plot normal;

var (behaviour x)



Proc glimmix data=dataset;

class chimp cgroup intervention period;

model behaviour = intervention*period intervention period/ link=logit dist=binomial ddfm=kr;

random _residual_;

random intercept / subject=chimp(cgroup) type=un;

lsmeans intervention*period intervention period/pdiff adjust=bon;

lsmeans intervention*period intervention period/cl ilink;


Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation