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.

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