Programming the statistical procedures from SAS

PROC GLM: hypothesis testing

Accepted Solution Solved
Reply
Contributor
Posts: 45
Accepted Solution

PROC GLM: hypothesis testing

Hi all,

 

I have such a proc glm test:

 

proc glm data=dataset1;
     class f1 f2 f3 ;
     model car = a b a*b f1 f2 f3 / solution;

run; quit;

 

Normally I would get individual t value and p value for each of the independent variables. But I also want to test this:

 

b1+b3=0.

b1 being the coefficient for variable a, and b3 being the coefficient for a*b

 

I've been doing some googling, and it seems that I need to use estimate or contrast statement? I didn't get the help I needed from googling. Anyone please help? Appreciate it!


Accepted Solutions
Solution
‎05-26-2016 04:26 PM
Contributor
Posts: 45

Re: PROC GLM: hypothesis testing

Hi PG,

 

Thanks for replying! But I have one question though.

 

Does "a 1 a*b -1" mean that I'm testing the hypothesis " b1-b3 = 0"?

 

Since I want to test if b1+b3=0, do I want to do the following:

 

estimate 'test' a 1 a*b 1?

 

Thanks!

View solution in original post


All Replies
Respected Advisor
Posts: 4,606

Re: PROC GLM: hypothesis testing

Add the statement

 

estimate 'test' a 1 a*b -1;

PG
Solution
‎05-26-2016 04:26 PM
Contributor
Posts: 45

Re: PROC GLM: hypothesis testing

Hi PG,

 

Thanks for replying! But I have one question though.

 

Does "a 1 a*b -1" mean that I'm testing the hypothesis " b1-b3 = 0"?

 

Since I want to test if b1+b3=0, do I want to do the following:

 

estimate 'test' a 1 a*b 1?

 

Thanks!

Respected Advisor
Posts: 4,606

Re: PROC GLM: hypothesis testing

Sorry, my error, you are right.

PG
Contributor
Posts: 45

Re: PROC GLM: hypothesis testing

Thanks a lot!

☑ This topic is SOLVED.

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

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