Programming the statistical procedures from SAS

help with glimmix procedure

New Contributor
Posts: 2

help with glimmix procedure

I am not sure if I use the right model for my data, can anyone help me to take a look at it?

The experiment is to evaluate the impact of different spray timing of a fungicide on leaf spot disease of barley.

Here is the experimental design: 2 location, 2 seeding dates, 5 spray timings including control, 4 replications, 3 cultivars; variables include disease severity (%), and yield.

Here is the code I wrote:

proc glimmix data=all;

class loc sd rep spd cv;

model ds=loc|sd|cv|spd/dist=normal link=identity;

random rep;

random _residual_/subject=loc*sd*spd*cv type=ar(1);

lsmeans loc*sd loc*cv loc*spd spd*cv/diff lines;


I am just start to learn sas by myself, have a lot of questions.

1. how to determine a data distribution;

2. how to determine random effect co variance structure?

Thanks for the help.

New Contributor
Posts: 2

Re: help with glimmix procedure

Come back with a new code.

The experiment design is a split plot design, 4 replications, main plot is spray timing, subplot is cultivar.

proc glimmix data=all;

class loc sd rep spd cv;

model ds=loc|sd|cv|spd /dist=binomial link=logit;

random spd*cv rep;



how to choose the right co variance structures in this case?

Respected Advisor
Posts: 2,655

Re: help with glimmix procedure

Add method=quad or method=laplace to the proc glimmix statment.  Then in the random statement, rearrange so that you have subject=rep, something like:

random intercept spd*cv/subject=rep type=<insert the type of covariance structure you wish to impose>;

Now, you will have to make several runs with the different error structure types.  For a split plot, type=vc and type=un are the only ones I can think of that really apply, unless you have some sort of spatial correlation that you wish to fit.

By using the integral based methods, you get quasi-likelihoods, and the information criteria (AIC, AICc) are appropriate for ranking the models.

Steve Denham

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