Programming the statistical procedures from SAS

Testing Slope=ONE

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Testing Slope=ONE

In an ANCOVA-like model (using GLM or MIXED or whatever) how do I test whether a Slope=ONE.

(not zero, 1)  ... testing whether the estimated slope = 1.

 

Proc GLM;

 Class Group;

 Model Y= Group X;

... something like: TEST X=1;

 

=== I know I could look at the CI for the parameter estimates and see if it contains 1; I want a p-value.

???


Accepted Solutions
Solution
‎01-13-2017 08:35 AM
Frequent Contributor
Frequent Contributor
Posts: 132

Re: Testing Slope=ONE

True, the TESTVALUE option is not available for the ESTIMATE statement in many SAS procedures (including GLM and MIXED, as well as GLIMMIX), which I noted in my response. (For testing a specific slope value, you would use ESTIMATE rather than LSMESTIMATE.)

 

But, as I also noted, you can use the STORE statement in GLM (or MIXED or GLIMMIX), and then the PLM procedure with the ESTIMATE statement and the TESTVALUE option. See

 

https://support.sas.com/resources/papers/proceedings10/258-2010.pdf

 

for more information about the PLM procedure; SAS documentation provides even more details. A chance to learn even more Smiley Happy

View solution in original post


All Replies
Frequent Contributor
Frequent Contributor
Posts: 132

Re: Testing Slope=ONE

The TESTVALUE= option on the ESTIMATE or LSMESTIMATE statement will do that. See

 

https://support.sas.com/resources/papers/proceedings11/351-2011.pdf

 

for an example. The TESTVALUE= option is not available for all procedures--for example, it is not available for GLIMMIX--but in those cases you can use the STORE statement and then use the PLM procedure to obtain the ESTIMATE or LSMESTIMATE statement with TESTVALUE option.

 

Occasional Contributor
Posts: 5

Re: Testing Slope=ONE

Sorry, but the TESTVALUE= option is not available in GLM. In MIXED, the option is available in the LSMEstimate statement, but it only allows CLASS values as an effect.  I need to test whether the slope of a continuous covariate is 1.

 

But, I appreciate the thought. I learned something.

Solution
‎01-13-2017 08:35 AM
Frequent Contributor
Frequent Contributor
Posts: 132

Re: Testing Slope=ONE

True, the TESTVALUE option is not available for the ESTIMATE statement in many SAS procedures (including GLM and MIXED, as well as GLIMMIX), which I noted in my response. (For testing a specific slope value, you would use ESTIMATE rather than LSMESTIMATE.)

 

But, as I also noted, you can use the STORE statement in GLM (or MIXED or GLIMMIX), and then the PLM procedure with the ESTIMATE statement and the TESTVALUE option. See

 

https://support.sas.com/resources/papers/proceedings10/258-2010.pdf

 

for more information about the PLM procedure; SAS documentation provides even more details. A chance to learn even more Smiley Happy

Occasional Contributor
Posts: 5

Re: Testing Slope=ONE

Ah. I spoke too soon.

Outputing a STORE in MIXED and then using the ESTIMATE statement in PLM works!

cool

Frequent Contributor
Frequent Contributor
Posts: 132

Re: Testing Slope=ONE

It is cool! I'm glad it worked for you.

Grand Advisor
Posts: 16,842

Re: Testing Slope=ONE

[ Edited ]

@AlBest Please mark answer as correct

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 181 views
  • 2 likes
  • 3 in conversation