turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Proc GLM vs. Proc Surveyreg

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-06-2009 02:12 PM

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2009 01:01 PM

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2009 01:09 PM

In addition, the number of degrees of freedom also could differ between the two procedures.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2009 01:31 PM

Thanks for the help. I appreciate it.