BookmarkSubscribeRSS Feed
dmj5648
Calcite | Level 5

Hi all,

 

I'm having some issues, getting an error message: WARNING: Obtaining minimum variance quadratic unbiased estimates as starting values for the covariance parameters failed.

 

Basically, I have five years of data collected on plant nutrient components, having 10 evaluations per given year. We considered year as a random factor and evaluation should be the considered as the repeated measure.

 

My code is this:

PROC GLIMMIX data=grass plots=studentpanel;
class name year block eval ;
model nutrient= name eval namet*eval / ddfm=kr ;
random block year;
random eval /sub=name*year*block type=toeph residual;
lsmeans Treatment eval treatment*eval /pdiff adjust = tukey lines;
ods output FitStatistics=Fout CovParms=Cout;
output out=resid pred=pred Student=Student;
quit;

 

 

however, whenever I change the second random statement to "Random _residual_ / sub=name*year*block type=toeph;" everything runs as it should.

 

Is there anything I'm missing?

4 REPLIES 4
SteveDenham
Jade | Level 19

I wrote a bunch of stuff that was wrong, so I will defer to others on this ( @StatsMan would be a good source).  I suspect the two versions order the R side differently.  In the end, they both should give the same results, but somehow _residual_ is able to get started where / residual is not.

 

SteveDenham

dmj5648
Calcite | Level 5

Thanks @SteveDenham, one of my concerns is that assigning _residual_ as the random factor would be incorrect as the factor that would have been the repeated measure. Would that be correct?

StatsMan
SAS Super FREQ

I can address some of the issues here, but if the OP can go back to the code and correct some issues there that will help. The variable names on the MODEL and LSMEANS statement do not agree with each other. Also, not sure everything that should be on the CLASS statement is there.

 

As usual, @SteveDenham is on the right track. The two RANDOM statements are not equivalent. While the use of RESIDUAL after the slash or _RESIDUAL_ before the slash can give the same covariances, that doesn't happen here because of the presence of the repeated effect EVAL on only one of the RANDOM statements. The RANDOM statement with EVAL knows to order the observations within a subject using the ordering of the CLASS levels of EVAL. The RANDOM statement without EVAL orders the observations within a subject as they appear in the data. You see this same behavior in PROC MIXED with/without the repeated effect before the slash on the REPEATED statement.

 

So if you want to order the observations within a subject by the levels of EVAL, use the RANDOM statement with RESIDUAL after the slash and EVAL before the slash.

 

If you can post the errors you receive, we might be able to diagnose those. It is highly likely that the issue is data dependent, though, and opening a track with SAS Technical Support would be the quickest way to overcome those messages.

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I would say that we do not know nearly enough about your experimental design to ponder your question.

 

What is "name", and how does that fixed effects factor figure into the experimental design? Is "name" some treatment factor applied to plots within blocks? As @StatsMan implies, "treatment" suddenly appears in the model! Is "treatment" equivalent to "name"? Clearly, the code you posted is not code that runs; that makes it very hard (if not impossible) for the Community to help you.

 

Are blocks (or plots within blocks) followed throughout the five years, or are blocks/plots re-established in each year?

 

Your current model incorporates block and year as crossed random effects. This is a valid design concept, but it is challenging to build a statistical model to implement that design structure, particularly with repeated measurements (assigned to evaluations) nested within year and, potentially, plots (assigned to "name") nested within blocks.

 

Your goal should be a statistical model that matches your experimental design and addresses your research questions. Your goal should not be "something that runs". Software does what you tell it to do, not what is correct.

 

I hope this helps move you forward.

 

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
  • 512 views
  • 1 like
  • 4 in conversation