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

Hi all,

 

I'm just a bit confused about using the TESTVALUE option in an lsmestimate statement.  

 

I'd like to be able to do what's shown in page 7 of this article:

lsmestimate A "A1 - A2" 1 -1/ testvalue=50;

 

For reasons unknown to me, the TESTVALUE option appears in some SAS documentation but not others:
https://documentation.sas.com/doc/en/statcdc/14.2/statug/statug_introcom_sect048.htm
https://documentation.sas.com/doc/en/statug/15.2/statug_glimmix_syntax14.htm

 

If I try to use it in an lsmestimate statement:

proc glimmix data=df plots=studentpanel method=rspl;
    class Year_CAT Trt_Amend_App Trt_CC ID_S Block ID_S_P;
    model Soil_C_ESM_15_DELTA_y0 = Trt_Amend_App | Trt_CC | Year_CAT ID_S / ddfm=kr2;
	random Block(ID_S);
    random Year_CAT / residual type=ar(1) subject=ID_S_P;
	lsmestimate Year_CAT * Trt_Amend_App "Test" 0 0 0 1 0 0 -1 0 / testvalue=8; 
run;

I get an error:  

622      lsmestimate Year_CAT * Trt_Amend_App "Test" 0 0 0 1 0 0 -1 0 / testvalue=8;
                                                                        ---------
                                                                        73
ERROR 73-322: Expecting an AT.

What could be going wrong here?  Does GLIMMIX not support this option?

 

Thanks for reading.

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

You are correct -- The LSMESTIMATE statement in PROC GLIMMIX does not support the TESTVALUE= option. The documentation on this statement is here ---

SAS Help Center: LSMESTIMATE Statement

 

The LSMESTIMATE statement in other procedures, such as PROC LOGISTIC, does support the TESTVALUE= option, as described in the documentation below:

SAS Help Center: LSMESTIMATE Statement

 

A little history: the LSMESTIMATE statement was first available in PROC GLIMMIX. Then a project was initiated to develop a set of post-fitting statements that can be used by many procedures. The LSMESTIMATE statement was one of them. These statements are described in details in the Shared Concepts and Topics section of the SAS/STAT documentation (rather than in a specific procedure). The TESTVALUE= option was added in this statement.

 

You can use the STORE statement in PROC GLIMMIX, then use the LSMESTIMATE statement in PROC PLM for post-fitting analysis. The TESTVALUE= option is available there.

 

Hope this helps,

Jill

View solution in original post

2 REPLIES 2
jiltao
SAS Super FREQ

You are correct -- The LSMESTIMATE statement in PROC GLIMMIX does not support the TESTVALUE= option. The documentation on this statement is here ---

SAS Help Center: LSMESTIMATE Statement

 

The LSMESTIMATE statement in other procedures, such as PROC LOGISTIC, does support the TESTVALUE= option, as described in the documentation below:

SAS Help Center: LSMESTIMATE Statement

 

A little history: the LSMESTIMATE statement was first available in PROC GLIMMIX. Then a project was initiated to develop a set of post-fitting statements that can be used by many procedures. The LSMESTIMATE statement was one of them. These statements are described in details in the Shared Concepts and Topics section of the SAS/STAT documentation (rather than in a specific procedure). The TESTVALUE= option was added in this statement.

 

You can use the STORE statement in PROC GLIMMIX, then use the LSMESTIMATE statement in PROC PLM for post-fitting analysis. The TESTVALUE= option is available there.

 

Hope this helps,

Jill

wateas
Obsidian | Level 7

I appreciate the clarification.

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore 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
  • 246 views
  • 1 like
  • 2 in conversation