BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

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.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
Xiaoningdemao
Quartz | Level 8

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.

 

PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
Xiaoningdemao
Quartz | Level 8
Dear Paige,

Oh, I see!!

Thank you very much!

Best wishes.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3318 views
  • 0 likes
  • 2 in conversation