BookmarkSubscribeRSS Feed
wbba222
Calcite | Level 5

Hello,

 

I'm trying to check affects between dependent variables before running tests on my data set but I keep getting an error message when trying to check with LSMEANS.

 

data v10r2timing;
input plot rep trt fung$ timing$ moisture tw yield;
cards;
205 2 1 none NTC 19.2 52.7 177.8531246
205 2 1 none NTC 19.2 52.7 177.8531246
403 4 1 none NTC 19.2 52.3 169.5848331
104 1 1 none NTC 19.2 53.3 156.6275595
312 3 1 none NTC 20.9 52.4 163.9054244
110 1 2 Delaro V10 21.2 51.4 188.2760082
402 4 2 Delaro V10 21.1 51.9 183.5223473
207 2 2 Delaro V10 19.1 53.5 163.3169461
308 3 2 Delaro V10 20.6 52.4 161.3609817
309 3 3 Triva V10 20.4 52.7 203.6156326
406 4 3 Triva V10 21.8 51 178.5306603
112 1 3 Triva V10 21.1 51.4 165.3998759
208 2 3 Triva V10 20.8 51.6 171.6888006
109 1 4 Head V10 20.5 52.4 177.9064594
311 3 4 Head V10 19.4 53.2 179.8935096
411 4 4 Head V10 18.6 53.2 174.0723452
204 2 4 Head V10 19.8 52.5 170.6010268
102 1 5 none NTC 19.8 52.1 164.6462049
303 3 5 none NTC 18.1 53.2 162.3858654
407 4 5 none NTC 19.3 53 165.5471783
212 2 5 none NTC 18.9 53.7 165.5048254
101 1 6 Delaro R2 19.6 51.6 171.6519377
401 4 6 Delaro R2 19.5 51.6 209.7455212
202 2 6 Delaro R2 19.7 51.7 178.8284676
304 3 6 Delaro R2 19.9 52.8 163.7364178
105 1 7 Triva R2 19.8 52.1 182.225473
305 3 7 Triva R2 20.1 52.4 193.138672
210 2 7 Triva R2 20.8 51.8 176.9195559
412 4 7 Triva R2 20.8 51.6 165.8828991
209 2 8 Head R2 18.9 52.7 182.394198
302 3 8 Head R2 20.5 52.3 177.0418856
111 1 8 Head R2 19.4 52.4 173.3306563
408 4 8 Head R2 19.4 52.6 165.329749
405 4 9 none NTC 19.7 52.7 197.8860052
106 1 9 none NTC 20 51.5 181.034741
211 2 9 none NTC 18.7 52.8 159.1446537
307 3 9 none NTC 19.4 53 161.5618535
301 3 10 Delaro v10r2 20.3 51.7 200.4840663
206 2 10 Delaro v10r2 20.8 51 180.3101577
103 1 10 Delaro v10r2 20.1 52.3 158.5048153
404 4 10 Delaro v10r2 22.4 51 171.4601391
409 4 11 Triva v10r2 21.2 51.4 192.3629617
306 3 11 Triva v10r2 21.8 50.3 191.9365811
203 2 11 Triva v10r2 20.5 51.7 176.9360711
108 1 11 Triva v10r2 21.7 51.4 170.1238565
201 2 12 Head v10r2 20.3 51.5 181.6381435
310 3 12 Head v10r2 20.8 50.7 199.8918381
410 4 12 Head v10r2 22.6 51.3 169.4745887
107 1 12 Head v10r2 20.4 52.3 169.8077339

;

proc glimmix data = v10r2timing;
class fung timing;
model tw = fung timing fung*timing;
random rep;
lsmeans fung/lines;
lsmeans timing/lines;
lsmeans fung*timing/lines;
run;

proc glimmix data = v10r2timing;
class fung timing;
model moisture = fung timing fung*timing;
random rep;
lsmeans fung/lines;
lsmeans timing/lines;
lsmeans fung*timing/lines;
run;

proc glimmix data = v10r2timing;
class fung timing;
model yield = fung timing fung*timing;
random rep;
lsmeans fung/lines;
lsmeans timing/lines;
lsmeans fung*timing/lines;
run;

 


NOTE: Convergence criterion (ABSGCONV=0.00001) satisfied.
NOTE: Estimated G matrix is not positive definite.
ERROR: LINES display is not produced for the fung effect because p-values are not available for all
least-squares means differences.
ERROR: LINES display is not produced for the timing effect because p-values are not available for
all least-squares means differences.
NOTE: PROCEDURE GLIMMIX used (Total process time):
real time 0.36 seconds
cpu time 0.03 seconds


172
173 proc glimmix data = v10r2timing;
174 class fung timing;
175 model moisture = fung timing fung*timing;
176 random rep;
177 lsmeans fung/lines;
178 lsmeans timing/lines;
179 lsmeans fung*timing/lines;
180 run;

 

NOTE: Convergence criterion (ABSGCONV=0.00001) satisfied.
ERROR: LINES display is not produced for the fung effect because p-values are not available for all
least-squares means differences.
ERROR: LINES display is not produced for the timing effect because p-values are not available for
all least-squares means differences.
NOTE: PROCEDURE GLIMMIX used (Total process time):
real time 0.11 seconds
cpu time 0.03 seconds


181
182 proc glimmix data = v10r2timing;
183 class fung timing;
184 model yield = fung timing fung*timing;
185 random rep;
186 lsmeans fung/lines;
187 lsmeans timing/lines;
188 lsmeans fung*timing/lines;
189 run;

 

NOTE: Convergence criterion (ABSGCONV=0.00001) satisfied.
ERROR: LINES display is not produced for the fung effect because p-values are not available for all
least-squares means differences.
ERROR: LINES display is not produced for the timing effect because p-values are not available for
all least-squares means differences.
NOTE: PROCEDURE GLIMMIX used (Total process time):
real time 0.10 seconds
cpu time 0.07 seconds

2 REPLIES 2
PaigeMiller
Diamond | Level 26

You cannot estimate all the terms in your model. This is not a SAS restriction, the underlying math does not allow Least Squares Means to be estimated from your data. You can see this here:

 

PaigeMiller_0-1700241396930.png

 

This "Non-est" usually happens when you have cells in your design with zero data points in a cell. PROC FREQ will identify those cells with zero data points.

 

PaigeMiller_0-1700242241672.png

 

 

Based on the above, you could remove timing='NTC' and fung='none' from your data, and then you will get results. Whether or not that is what you want is up to you.

 

proc glimmix data = v10r2timing(where=(timing ^= 'NTC' and fung ^='none'));

 

--
Paige Miller
SteveDenham
Jade | Level 19

Alternatively, you could fit a MODEL statement with only the interaction term, and use LSMESTIMATE statements to derive the main effect marginal means and standard errors, and with a JOINT option, an F test. That would eliminate the issues seen, but carries the penalty of you having to do the LINES equivalent in a post-processing step.

 

SteveDenham

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2 replies
  • 688 views
  • 2 likes
  • 3 in conversation