BookmarkSubscribeRSS Feed
DataScientist
Quartz | Level 8

Hi,

 

I'm trying to following the document below to run a logistic regression in the CARS dataset (from SASHELP) using the logistic regression task from SAS  

 

https://support.sas.com/resources/papers/proceedings13/407-2013.pdf

 

The document says run logistic regression after running a code snippet that uses the upper quartile as the threshold to indicate a high-priced car and a data step to create a new variable, “MSRP_HIGH” with values of 1=yes and 0=no.

 

Code snippet:

 

DATA CARS;
FORMAT MSRP_HIGH 8.;
SET SASHELP.CARS;
IF MSRP >= 39215 THEN MSRP_HIGH=1;
ELSE MSRP_HIGH=0;
LABEL MSRP_HIGH='HIGH-PRICED CAR';
RUN;

 

The document is missing instructions on how I can use the logistic regression task to generate the required output. This is on Page 6 of the pdf above. They've indicated that we can use Origin and Horsepower for the exercise.

 

Any instructions on how to run the task will be much appreciated.

 

Cheers,

 

Sandesh

1 REPLY 1
StatDave
SAS Super FREQ

Select Logistic Regression the same way as Linear Regression was selected earlier in the document (display 3). The Logistic Regression task will be shown and you can fill in the fields and select any desired options. There is help within the task - see the messages that appear at the bottom of the task dialog similar to what was shown for the Linear Regression task. Use the Help button for more help. You will need to specify which is the response variable, the level of the response that is the event level of interest, and in the Model section, select the predictors you want in the model.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1 reply
  • 1328 views
  • 0 likes
  • 2 in conversation