08-16-2016 12:30 PM - edited 08-17-2016 09:13 AM
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;
output out = results1 p = pred r = resid;
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?
08-17-2016 10:03 AM
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.