N/A
Posts: 0

# Proc GLM vs. Proc Surveyreg

I have run the exact same regression model in both GLM and Surveyreg. I then use the Contrast statement to perform an F-test for the difference between two coefficients. I am trying to figure out why the F-value is different between the two. Here is the code I run:

proc glm data=My_Data;
class CUSIP SIC2 YEAR;
model Y=X1 X2 CUSIP SIC2 YEAR / Solution;
contrast 'X1=X2' X1 1 X2 -1; run;

Output: F-value = 7.91, p-value = .0049

proc surveyreg data=My_Data;
class CUSIP SIC2 YEAR;
model Y=X1 X2 CUSIP SIC2 YEAR / Solution;
contrast 'X1=X2' X1 1 X2 -1; run;

Output: F-value = 3.93, p-value = .0474

The two regressions have the same parameter estimates, but different standard errors and t-statistics. Can you tell me what the difference is between surveyreg and GLM?

Thanks
Frequent Contributor
Posts: 77

## Re: Proc GLM vs. Proc Surveyreg

Hi MatthewSAS,

I did a little experiment on my own: fitted the same model with PROC GLM then with PROC SURVEYREG. I got same estimates of the regression coefficient but F-statistics and p-values were somewhat different.

Since it's the same model the reason must be the different methods used to estimate variance-covariance matrix of the regression coefficients - and yes, they are different. Here is some information I found in SAS/STAT(R) 9.2 User's Guide:

Variance estimation in PROC SURVEYREG
http://support.sas.com/documentation/cdl/en/statug/59654/HTML/default/statug_surveyreg_a0000000257.h...

Hypothesis testing in PROC GLM
http://support.sas.com/documentation/cdl/en/statug/59654/HTML/default/statug_glm_sect040.htm
Frequent Contributor
Posts: 77