How to calculate area under curve in Logistic Regression SAS?
- User
How to calculate area under curve in Logistic Regression SAS?
- Assistant
To calculate the area under the curve (AUC) for logistic regression in SAS, you can use the PROC LOGISTIC procedure along with the ROC statement. Here's an example of how to do this:
-
First, prepare your dataset. Make sure you have a binary outcome variable (e.g., 1 for success, 0 for failure) and one or more predictor variables.
-
Run the PROC LOGISTIC procedure with your dataset and predictor variables. Use the DESCENDING option if your outcome variable is coded as 0=failure, 1=success.
proc logistic data=your_dataset_name descending; model your_outcome_variable (event='1') = predictor_variable1 predictor_variable2 / link=logit; roc 'Label for ROC curve' / nooffset-
Use the ROC statement to compute the ROC curve and AUC. The 'Label for ROC curve' is a descriptive name for that particular ROC curve, and you can replace with your own text.
-