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

Dear SAS Community,

 

I'm running the following model and I'm still getting this warning for this particular variable. My model includes Depth as a split-block, and it is also a weighted repeated measures analysis.

Proc glimmix data=one;
class Exp blk Trt Rate Depth Date;
model RL=Trt|Rate|Depth|Date/dist=lognormal ddfm=kr;
random intercept Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date/subject=blk ;
random Date/residual subject=blk(Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date) type=vc;
weight RL_wt;
run;

 

I would greatly appreciate some help!

 

Thank you very much

Caroline

1 ACCEPTED SOLUTION

Accepted Solutions
StatsMan
SAS Super FREQ

From your data, it appears that you have 3 repeated measures on each blk(rate*trt*depth) combination. If that is correct, then you can use subject=blk(rate*trt*depth) on the RANDOM statement fitting your r-side structure. TYPE=VC clusters the data by those subjects, but fits a single variance term down the diagonal of the R matrix. 

 

You have EXP on the CLASS statement, but I do not see EXP in your MODEL or RANDOM statements. You can remove that effect from the CLASS statement. 

You only have 1 observation at the blk*trt*rate*depth*date level, so that effect should not be on the g-side RANDOM statement (your first RANDOM statement). 

This model may have converged with other dependent variables. I would check the log to make sure there were no warnings in those models.

View solution in original post

9 REPLIES 9
SteveDenham
Jade | Level 19

You are probably going to need to expand on this, but as a first step why not drop back to   

 

random intercept/subject=blk;

and see if that gets the algorithm going. I am a bit confused by having as many random effects as you specify in the current RANDOM statement - you may be exhausting the available data.  Additionally, specifying Date as a repeated measure and then including all the Date related factors, including Date itself, as being nested within blk is probably causing singularity issues.

 

SteveDenham

 

palolix
Obsidian | Level 7

Thank you so much for helping me Steve!

 

I tried that, so now it looks like this:

 

Proc glimmix data=one ;
class Exp blk Trt Rate Depth Date;
model RL=Trt|Rate|Depth|Date/dist=lognormal ddfm=kr;
random intercept /subject=blk ;
random Date/residual subject=blk(Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date) type=vc;
weight RL_wt;
run;

 

I still get the same warning.

jiltao
SAS Super FREQ

This RANDOM statement --

random Date/residual subject=blk(Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date)  type=vc;

has an unusual specification of the subject effect. I wonder how your data looks like? And what happens if you comment out this statement?

Thanks,

Jill

 

palolix
Obsidian | Level 7

Thanks for your help Jiltao!

 

I only left subject=blk on both statements but still get the same warning. I know it looks complicated, but it is probably because I included depth as split block and date as repeated measures (I wouldn't be surprised if I didn't get this right though). Nevertheless, with the other dependent variable (Ring) I don't get this warning when using this model.

 

Proc glimmix data=one ;
class Exp blk Trt Rate Depth Date;
model RL=Trt|Rate|Depth|Date/dist=lognormal ddfm=kr;
random intercept /*Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date*//subject=blk ;
random Date/residual subject=blk/*(Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date)*/ type=vc;
weight RL_wt;
run;

 

I attached the data. 

 

Thank you very much

Caroline

StatsMan
SAS Super FREQ

From your data, it appears that you have 3 repeated measures on each blk(rate*trt*depth) combination. If that is correct, then you can use subject=blk(rate*trt*depth) on the RANDOM statement fitting your r-side structure. TYPE=VC clusters the data by those subjects, but fits a single variance term down the diagonal of the R matrix. 

 

You have EXP on the CLASS statement, but I do not see EXP in your MODEL or RANDOM statements. You can remove that effect from the CLASS statement. 

You only have 1 observation at the blk*trt*rate*depth*date level, so that effect should not be on the g-side RANDOM statement (your first RANDOM statement). 

This model may have converged with other dependent variables. I would check the log to make sure there were no warnings in those models.

palolix
Obsidian | Level 7

Thank you very much for your help StatsMan! 

 

Since I was combining two experiments, I left Exp in the class statement, but when I removed it, I was able to get SAS running without any warning.  

Thanks a lot!

palolix
Obsidian | Level 7

I noticed that the problem was the weight statement (I did a weighted analysis since I'm combing two experiments). I stopped getting the warning because I made a mistake and add Ring_wt for the RL variable, instead of RL_wt. If a remove the weight statement SAS is able to provide results without any warning. I went back to the model used to get the residuals and got this warning: WARNING: MIVQUE0 estimate of profiled variance is linearly related to other covariance parameters.

 

This is the model I used to obtain residuals to calculate weights:

 

Proc glimmix data=one;
by Exp;
class blk Trt Rate Depth Date;
model RL=Trt|Rate|Depth|Date/dist=lognormal ddfm=bw/*to get residual variances*/;
random intercept Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date/subject=blk;
random Date/residual subject=blk(Trt*Rate Depth Trt*Rate*Depth Date Trt*Date Depth*Date Trt*Rate*Depth*Date) type=cs;
lsmeans Trt*Rate*Depth*Date;/*to get the error DF*/
run;

 

I wonder if the random statements are correct (I want date as repeated measures, and rate and depth as split-block factors within the model).

 

Thank you very much!

Caroline

jiltao
SAS Super FREQ

Got your data. Thank you.

First of all, specifying TYPE=VC for the R-side random effect for the lognormal data does not make sense -- you are specifying  the default R structure. You might consider something like TYPE=CS or TYPE=AR(1) or something else that models the correlations in the R matrix.

Next, it seems to me that there are potentially many random effects. Here is one that works for me, assuming EXP is not needed in the model (same as what you specify in your model) --

 

Proc glimmix data=one;
class blk Trt Rate Depth Date;
model Ring=Trt|Rate|Depth|Date/dist=lognormal ddfm=kr;
random trt rate depth Trt*Rate trt*depth /subject=blk;
random Date/residual subject=blk(blk*trt*rate*depth) type=cs;
weight Ring_wt;
run;

Hope this helps.

Jill

 

Th

palolix
Obsidian | Level 7

Thank you for the suggestions Jiltao!

 

I tried changing the type to cs or ar(1), ante (1), etc, but only vc worked. At least I stopped getting the warning after I removed Exp from the class statement. When trying with ar(1) I get the same warning, and whit cs I get this ERROR: QUANEW Optimization cannot be completed.

 

Thank you so much for your support!

Caroline

 

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
  • 9 replies
  • 738 views
  • 4 likes
  • 4 in conversation