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

I have a model like so:

 

proc surveyreg data=table1;
	class year industry;
 	model estimate = var1 var2 var1*var2 var3 var4 year industry /solution ADJRSQ;
run;

My results show var1 is significantly positive and var1*var2 is significantly negative. I want to find if the net effect on var1 (var1+var1*var2) is significant. How do I do that?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

You will have to decide for which value of var2 you want to estimate the marginal effect of var1.

 

In the following analysis, the effect of height is estimated at age=12 :

 

proc surveyreg data=sashelp.class;
class sex;
model weight = height height*age sex / solution;
estimate  'Marginal Height at Age=12' height 1  height*age 12;
run;
PG

View solution in original post

4 REPLIES 4
PGStats
Opal | Level 21

You will have to decide for which value of var2 you want to estimate the marginal effect of var1.

 

In the following analysis, the effect of height is estimated at age=12 :

 

proc surveyreg data=sashelp.class;
class sex;
model weight = height height*age sex / solution;
estimate  'Marginal Height at Age=12' height 1  height*age 12;
run;
PG
BobSmith
Fluorite | Level 6

@PGStats: Thank you. So if var2 is a binary variable and I'm looking for when var2 = 1, I would do something like this:

 

estimate 'Marginal Effect' var1 1 var1*var2 1;

Can you please explain to me why we are setting var1 (or height, in your example) to 1? Is this essentially testing the hypothesis that var1 = var1*var2?

PGStats
Opal | Level 21

Estimate 'Marginal Effect' Var1 a Var1*var2 b;

 

will estimate the quantity a*Var1 + b*Var1*Var2

 

where Var1 and Var1*Var2 are regression estimates.

 

The marginal effect of Var1 is the change in the dependent variable that is predicted when Var1 is changed by 1 unit and everything else stays the same. When Var2 = 1, the predicted change in estimate is Var1+Var1*Var2 (i.e. a=1, b=1).

 

The hypothesis that is tested is Var1 + Var1*Var2 = 0. You can change the right hand side of that hypothesis with the TESTVALUE= option.

 

PG
BobSmith
Fluorite | Level 6

@PGStats Brilliant, thank you.

sas-innovate-2024.png

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.

 

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
  • 1784 views
  • 6 likes
  • 2 in conversation