Programming the statistical procedures from SAS

How to compare two coefficients in PROC SURVEYREG?

Reply
Occasional Contributor
Posts: 10

How to compare two coefficients in PROC SURVEYREG?

I have a model:

 

 

proc surveylogistic data=table;
  class year industry;
  model dep (descending) = x1 x2 x3 x4 x5 year industry /rsquare;
run;

To test if x1 is statistically different than x2, I do:

 

 

 

proc surveylogistic data=table;
  class year industry;
  model dep (descending) = x1 x2 x3 x4 x5 year industry /rsquare;
  test1: test x1 = x2;
run;

How do I do the same in PROC SURVEYREG? This does not work:

 

 

proc surveyreg data=table;
  class year industry;
  model dep (descending) = x1 x2 x3 x4 x5 year industry /solution rsquare;
  test1: test x1 = x2;
run;

The above throws an error, 

ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, *,
              -, /, :, @, _CHARACTER_, _CHAR_, _NUMERIC_, |.
ERROR 200-322: The symbol is not recognized and will be ignored

I'm looking to test if two coefficients in PROC SURVEYREG are statistically different from each other.

SAS Employee
Posts: 50

Re: How to compare two coefficients in PROC SURVEYREG?

Since SURVEYREG does not have a TEST statement that will allow multiple effects on it. Instead you should use a CONTRAST statement instead.

 

test x1=x2;

 

which is the same as 

x1-x2=0

 

would translate to 
contrast 'test_label' x1 1 x2-1;

Ask a Question
Discussion stats
  • 1 reply
  • 119 views
  • 0 likes
  • 2 in conversation