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.
???
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 🙂
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.
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.
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 🙂
Ah. I spoke too soon.
Outputing a STORE in MIXED and then using the ESTIMATE statement in PLM works!
cool
It is cool! I'm glad it worked for you.
@AlBest Please mark answer as correct
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.