I ran a regression of the following form:
proc panel data = vr_input ;
id gvkey rankyear;
model vr_diff = readj_avg sum_AA sum_AB sum_AC sum_AR sum_AS sum_AT sum_AZ sum_EE
/ fixtwo;
test sum_AA = sum_AB = sum_AC = sum_AR = sum_AS = sum_AT = sum_AZ = sum_EE;
run;
quit;
I want to test wether the coefficients sum_AA/sum_AB/sum_AC/... are different from one each other. I.e. I want to test the null hypothesis that the respective regression coefficients are equal.
To my understanding, this can be done by conducting a Wald test. After reading the SAS documentation I found out that adding the "test" line as done above is the way to conduct this in SAS. Is this correct?
If so, the outputs are a bit confusing to me. The usual t-test statistics tell me that some of the coefficients of interest are significantly different from 0 and some or not. Intuitively this implies that the coefficients differ from each other. However, the Wald test tells me that the coefficients are in fact not significantly different from each other. How is this possible?
test sum_AA = sum_AB = sum_AC = sum_AR = sum_AS = sum_AT = sum_AZ = sum_EE;
I think this is correct, but as I don't use PROC PANEL, you might have to parameterize it differently. You could also add the /WALD option. And you should remove SUM_AS.
The usual t-test statistics tell me that some of the coefficients of interest are significantly different from 0 and some or not.
I don't see that in your output. To me they all look not significantly different from 0.
Consider the following to get rid of the AS problem (I would wager that AS occurs either first or last in the actual dataset).
proc panel data = vr_input ;
id gvkey rankyear;
model vr_diff = readj_avg sum_AA sum_AB sum_AC sum_AR sum_AS sum_AT sum_AZ sum_EE
/ fixtwo noint printfixed;
test sum_AA = sum_AB = sum_AC = sum_AR = sum_AS = sum_AT = sum_AZ = sum_EE/all;
run;
quit;
This should put all estimates as the means (rather than as a deviation from the overall mean) and provide all sorts of tests regarding the general equality of the sum_ variables.
SteveDenham
Unfortunately, excluding the intercept does not solve the issue of not getting an estimate for sum_AS. I do not know why though.
At a 10 percent level, one is significantly different from zero. At the same time, at the 10 percent level, the values dont differ from each other.
@shenflow wrote:
At a 10 percent level, one is significantly different from zero. At the same time, at the 10 percent level, the values dont differ from each other.
It's always helpful to state in your initial message what alpha level you are using if it is not 5 percent.
Unfortunately, excluding the intercept does not solve the issue of not getting an estimate for sum_AS. I do not know why though.
Didn't we discuss this in an earlier thread? There are linear combinations of variables in your data set that a perfectly correlated with other linear combinations, and so in this case one the slope of the original variables cannot be estimated.
@PaigeMiller You did suggest dropping the variable. I thought it may be confounded with the intercept, making the NOINT option worthwhile. And it didn't work, so that leaves your approach as the only option.
SteveDenham
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.