# Comparing OLS regression coefficients with SUR in SAS

I have the following code in Stata that I'm looking for the equivalent in SAS.

Stata code:

regress DV X1 X2 X3 X4 X5 if groupID == 0
est tab, b se stats(r2_a)
est store groupID0

regress DV X1 X2 X3 X4 X5 if groupID == 1
est tab, b se stats(r2_a)
est store groupID1

suest groupID0 groupID2, vce(cluster firmID)
test [groupID0_mean]_cons = [groupID1_mean]_cons
test [groupID0_mean]X1 = [groupID1_mean]X1
test [groupID0_mean]X2 = [groupID1_mean]X2
test [groupID0_mean]X3 = [groupID1_mean]X3
test [groupID0_mean]X4 = [groupID1_mean]X4
test [groupID0_mean]X5 = [groupID1_mean]X5


The first two regress statements perform OLS and save the coefficients, which I know how to do in SAS. The suest statements performs seeming unrelated regression on both group1 and group2 with clustered standard errors and then tests the equality of coefficients. It's the block of code from suest down that I cannot figure out in SAS.

Any help would be appreciated!

• I think the SUEST statements will end up being LSMEANS statement but it does depend on what PROC you're using, REG or GLM? Jan 18 '19 at 23:59

proc syslin data=in sur;