Dear All,
I want to do a t-test on the slope of a simple linear regression.
H0: slope=1 VS Ha: slope !=1;
I tried the folowing code,"test predicted=1; ", but it performed the overall F test on slope=1 and intercept=0
proc reg data=test;
model observed=predicted;
test predicted=1;
quit;
Thanks!!
Best wishes.
The TEST command does not product the standard ANOVA F-test. The TEST commands tests the specific hypothesis you are interested in, which in this case is testing the slope = 1 only.
It's not obvious why you are making the statement that the TEST command is testing "the overall F test on slope=1 and intercept=0 ", as far as I know, this is not true. Why do you think it is testing this and not testing slope=1?
I also am mystified by
model observed=predicted;
as this makes little sense to me.
Dear Paige,
Thank you for the response!
You are right, I should wrote
model observed=predicters;
maybe this is more reasonable?
As for the TEST command, the output shows a F-test. Isn't F-test come with ANOVA, and is an overall global test testing "slope=1 and intercept=0"?
Thank you!
Best wishes.
The TEST command does not product the standard ANOVA F-test. The TEST commands tests the specific hypothesis you are interested in, which in this case is testing the slope = 1 only.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.