BookmarkSubscribeRSS Feed
JohnWilkenson
Fluorite | Level 6

Does anybody know if it's possible to run a response surface analysis in SAS when the outcome variable is binary?

Simply adding 'link=probit' to the model section of proc rsreg, doesn't seem to do the trick.

 

Thanks.

 

 

9 REPLIES 9
Rick_SAS
SAS Super FREQ

No. PROC RSREG is a quick way to evaluate linear models with a continuous response. The models it handles are similar to those in PROC GLM, except that quadratic interactions are handled automatically.

 

It's not clear which portions of the PROC RSREG output you want to duplicate. If you want to plot the response surface, you can use the EFFECTPLOT statement to display the response surface. The EFFECTPLOT statement is supported by PROC LOGISTIC. Here is an example:

proc logistic data=sashelp.class;
   model sex = Height | Weight Height*Height Weight*Weight; 
   effectplot;
run;

 

JohnWilkenson
Fluorite | Level 6

Thank you for your reply!

 

My goal is to look at the interplay between a certain value of an employer (=variable X1) and employee (variable X2), on the occurrence of a promotion for the employee (variable Y).

 

Am I right to presume that the proc rsreg statement below can be replaced by the following proc logistic statement?

 

proc rsreg;
model y=x1 x2;
run;

 

proc logistic data=file1;
model y(event='1')= x1 x1*x1
                                x2 x1*x2 x2*x2;
run;


And are there alternative statements to proc rsreg which allow the investigation of the shape of the response surface and the search for a optimum response in the response surface in an logistic regression model?

 

PaigeMiller
Diamond | Level 26

I think that is the right model to fit in PROC LOGISTIC. However, the diagnostic capabilities in PROC RSREG to help you understand the model fit in x1 and x2 (eigenvectors, graphics) are mostly absent in PROC LOGISTIC. Obviously, you could write your own diagnostics, but that's a pain and not something everyone would want to do.

--
Paige Miller
Rick_SAS
SAS Super FREQ

Yes, that is the correct syntax. I updated my original response.

PaigeMiller
Diamond | Level 26

I was trying to think of a way to trick PROC RSREG to work with the logistic regression results.

 

I think you can trick RSREG to perform the diagnostics to help you understand the shape of the fitted model in the X-space, but the statistical significance tests would be meaningless. The steps would go something like this: fit the model in PROC LOGISTIC, obtaining predicted log odds ratio for each data point and output a data set. Then in PROC RSREG, fit the model again using the predicted log odds ratio from PROC LOGISTIC as the response. I think RSREG then gives you valid diagnostics to help you understand the shape of the fitted curve in x-space for the predicted log odds ratio.

 

But I also point out I haven't actually tried this. Sounds like it should work though.

 

 

--
Paige Miller
JohnWilkenson
Fluorite | Level 6

Thanks! I'll give it a try.

 

JohnWilkenson
Fluorite | Level 6

If I were to write the diagnostics myself, could I then obtain credible significance tests? 

 

I would have to copy the three sections of proc rsreg into a logistic regression framework:

1) model fitting and analysis of variance, including lack-of-fit testing, to estimate parameters
2) canonical analysis to investigate the shape of the predicted response surface

3) ridge analysis to search for the region of optimum response

Does anybody know of any SAS guides to facilitate this?

PaigeMiller
Diamond | Level 26

@JohnWilkenson wrote:

If I were to write the diagnostics myself, could I then obtain credible significance tests? 

 

I would have to copy the three sections of proc rsreg into a logistic regression framework:

1) model fitting and analysis of variance, including lack-of-fit testing, to estimate parameters
2) canonical analysis to investigate the shape of the predicted response surface

3) ridge analysis to search for the region of optimum response

Does anybody know of any SAS guides to facilitate this?


You get the credible significance tests and lack of fit from PROC LOGISTIC.

 

You only use PROC RSREG to show you graphics and diagnostics on the X-space.

 

You'd have to run them both. 

 

So, I wouldn't try to write your own, unless this method I am proposing doesn't really work.

--
Paige Miller
PaigeMiller
Diamond | Level 26

If I were to write the diagnostics myself

 

Adding

 

You could write a macro that first calls PROC LOGISTIC and produces the significance tests and lack-of-fit test and the regression coefficients and outputs the predicted values of the log-odds ratio. Then, the macro goes ahead and uses RSREG as I described earlier to output the diagnostics and graphics on the X-space.

 

In no case that I envision would you have to write the diagnostics yourself.

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 941 views
  • 7 likes
  • 3 in conversation