## Statistical test for the difference between coefficients in multiple regression

Occasional Contributor
Posts: 16

# Statistical test for the difference between coefficients in multiple regression

I have a multiple regression equation with year and industry fixed effect as below.

y = x1 + D + x1*D + FE + error (x1 is continuous and D is binary)

and I have another dummy variable (let's say, Z = 0 or 1).

What I want to see is if the coefficients on x1*D are statistically significantly different for the subsample Z =1 and Z=0.

What I have tried is 3-way interaction (x1*D*Z). However, because of fixed effects, the difference in the coefficient on x1*D from separate regression for Z=0 and Z=1 is not the same as the coefficient on 3-way interaction. (Separate regression allows the error term to vary separately whereas 3-way interaction multiple regression does not)

In the end, what I want is 3 columns with the coefficients for Z=0, Z=1, and the difference. Is there some type of test in SAS where I can achieve this?

Regular Contributor
Posts: 162

## Re: Statistical test for the difference between coefficients in multiple regression

sounds like a subgroup analysis stratifying by z. The interaction then is the right way to go. You'd use an estimate statement for the difference and lsmeans statement for the group estimates. Although i'm not sure i understand your description of the model. Is year fixed or is year x1? what is FE? etc

--------------
blog: papersandprograms.com
Occasional Contributor
Posts: 16

## Re: Statistical test for the difference between coefficients in multiple regression

I apologize that my explanation was inadequate. FE is for fixed effect. So original model looks like below.

y = α1 x1 + α2 D + α3 x1*D + α4 d_1990 + α5 d_1991 + ... + d_2017 + d_sic1 + d_sic2 + ... + d_sic48 + error

where d_1990 to d_2017 are year dummies and d_sic1 to d_sic48 are industry dummies.

What I want is to look at the difference in α3 for the sample with Z=0 and the sample with Z=1.

But because of FE (fixed effects) that are laid out as d_1990 to d_2017 and d_sic1 to d_sic48, if I run the regression separately for Z=0 group and Z=1 group, the the difference in α3 from the two regressions is not the same as the coefficient on 3-way interaction (x1*D*Z) from 1 multiple regression with bunch of interactions.

I know the intuition and interpretation won't be different, but I need the numbers (the difference and the 3-way interaction) to be the same to put in my result table.

Regular Contributor
Posts: 162

## Re: Statistical test for the difference between coefficients in multiple regression

[ Edited ]

why do you create indicator variables instead of using a class statement? Running the models separately versus using an interaction won't necessarily give exactly the same result; i would use the interaction, others have discussed it in detail eg: https://www.lexjansen.com/pharmasug/2009/po/PO08.pdf

https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-do-subgroup-analysis/td-p/82638

--------------
blog: papersandprograms.com
Discussion stats
• 3 replies
• 103 views
• 0 likes
• 2 in conversation