Programming the statistical procedures from SAS

Restrict statement in PROC REG

Reply
Contributor
Posts: 28

Restrict statement in PROC REG

[ Edited ]

I have a data set that predicts the cost of a hospital stay. A patient may be seen by up to three doctors. Here are the variables:

 

cost hospital age diagnosis doctor1 doctor2 doctor3

 

Once I test the betas for doctor1-doctor3 and find no sig. diff., I want to force their betas to be the same. Here's my code:

 

proc reg data = hospcost;

   model cost = hospital age diagnosis doctor 1 doctor2 doctor3;

   restrict doctor1=doctor2=doctor3;

   output out = results1 p = pred r = resid;

run;

 

The model runs, but at the bottom of the table of parameter estimates I see two variables called restrict. My adj-R2 is the same as when I didn't use the restrict statement. That shouldn't happen. Further, when I run a proc univariate on resid they are distributed in almost a perfect normal curve. Can anyone explain what is occurring?

Andrew A. Kramer, PhD
President
Prescient Healthcare Consulting
Contributor
Posts: 28

Re: Restrict statement in PROC REG

Sorry to be answering my own question, but after doing some reading I think I know what's happening. In the RESTRICT staement a Lagrangian parameter is being added for each restriction. These parameters have associated standard errors, and their p-values indicate if the restrictions are not valid (low p-values).

 

An alternative way to specify the model would be to have a single beta for the new variable (doctor1 + doctor2 + doctor3). The results obtained from this model and the one above should be the same. 

 

If this is not correct please let me know.

 

Thanks! 

Andrew A. Kramer, PhD
President
Prescient Healthcare Consulting
Ask a Question
Discussion stats
  • 1 reply
  • 202 views
  • 0 likes
  • 1 in conversation