Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
whs278
Quartz | Level 8

Hi,

 

I know you can do a partial F-test with PROC REG to jointly test a set of parameters.  For example,

 

 

PROC REG DATA = dataset
   MODEL y = x1 x2 x3; 
   TEST x2=x3=0;
RUN;

Which gives me output that looks like this.

 

Partial_F-Test_Output.png

 

 

I would like to know if there is a way to perform the same the test using PROC GLM.

 

Thank you very much.

 

Sincerely,

 

Bill

4 REPLIES 4
whs278
Quartz | Level 8
This is not the answer
PaigeMiller
Diamond | Level 26

I think it is the answer.

--
Paige Miller
whs278
Quartz | Level 8

I'm not sure how the solution below provides an answer on how to write a PROC GLM step that would jointly test a set of parameters using a partial f-test. 

------------------------------------------------------

 

 

Y = B0 + B1*Asian + B2*Black + B3*White + B4*X + B5*X*Asian + B6*X*Black + B7*X*White + e

 

The CLASS RACE statement creates dummy variables (Asian, Black, White) with values (1,0,0) for RACE="Asian", (0,1,0) for RACE="Black" and (0,0,1) for RACE="White". SAS will force parameters B3 and B7 to zero because they are redundant, so that the linear equations are:

 

Asian : Y = (B0+B1) + (B4+B5)*X

Black : Y = (B0+B2) + (B4+B6)*X

White : Y = B0 + B4*X

 

The F test for effect RACE*X tests the hypothesis B5=B6=B7=0 which, if true, would mean that all slopes are equal.

 

hth

 

PG

 

Message was edited by: PG corrected typo reported by Steve Denham.

PG

View solution

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register 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
  • 4 replies
  • 3816 views
  • 3 likes
  • 2 in conversation