BookmarkSubscribeRSS Feed
swuga
Calcite | Level 5

Hi,

 

I have a problem with repeated measures using Proc Glimmix and wonder if anyone could help me look at it and find a solution. Here is my code:

 

Proc glimmix data=mortality plots=residualpanel;

class insect treatment rep time;

model mort=insect|treatment|time rep/ d=beta;

random intercept / subject=rep;

random time / residual subject=insect*treatment*rep type=AR(1);

lsmeans insect*treatment*time/ slicediff=(insect treatment time) Adjust=Tukey lines plots=meanplot (cl join);

run;

 

 I am looking at the proportional mortality (mort) of two types of insects at various treatments (5 treatments) at repeated observations (3 time points).  Each treatment had 3 experimental units; the experiment was run in 2 repetitions (rep as block).  I would like to know the effect of insect, treatment, time, and interactions.  I use beta distribution.

 

The model works without Random statements.  But after adding Random for repeated measures, it first showed that "WARNING: Obtaining minimum variance quadratic unbiased estimates as starting values for the covariance parameters failed".

 

I realized PROC GLIMMIX can only have one observation per level of the repeated effect for each subject, and I have 3 experimental units for each treatment, a total of 2 insects * 5 treatments*2 repetitions*3 experimental units=60 units for each of the 3 observation times. Thus I added a column to label each unit (1-60 for each observation time) and changed the code as:

 

Proc glimmix data=mortality plots=residualpanel;

class insect treatment rep unit time;

model mort=insect|treatment|time rep/ d=beta;

random intercept / subject=rep;

random time / residual subject=unit type=AR(1);

lsmeans insect*treatment*time/ slicediff=(insect treatment time) Adjust=Tukey lines plots=meanplot (cl join);

run;

 

Then, there was an error "NOTE: Did not converge". I wonder what step was wrong and how I could fix it.

 

Many thanks!

1 REPLY 1
Rajesh3
Obsidian | Level 7

Hello,

 

You need to be cautious when increasing the random parameters in the model. Based on the error that you got, the variance-covariance matrix might be showing negative values for variance or 0 for covariance. This means a simpler model (without a random intercept/linear trend) is a better alternative in your case. Also, I don't understand why you used 'rep' (i am assuming this to be the id variable) in the model as a covariate.

 

Thanks,

Rajesh.

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
  • 1 reply
  • 674 views
  • 0 likes
  • 2 in conversation