Programming the statistical procedures from SAS

How to create a predictive model using test and train datasets available

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 117
Accepted Solution

How to create a predictive model using test and train datasets available

[ Edited ]

Hello all,

 

I want to create a basic model which would identify/predict customers those are eligible to get the loan so that these customers would be targeted by the customer care people.

 

Please find the attachments for sample documents. I am new to modelling , so i would like to know how this can be done in SAS.

 

And i want to automate this finally to run on weekly/monthly basis.

 

 

Thank you.

Vish

Attachment
Attachment
Attachment

Accepted Solutions
Solution
‎05-12-2017 03:08 AM
SAS Employee
Posts: 187

Re: How to create a predictive model using test and train datasets available

Assuming that your response is binary (eligible vs not), you would be fitting a logistic model. You can use PROC LOGISTIC to fit the model and the SCORE statement in that procedure to get predicted probabilities of eligibility for you test data set.  See the LOGISTIC documentation and examples there such as the "Scoring data sets" example.  Basic code would be like:

 

proc logistic data=train;

model binary_response(event="Y") = predictor1 predictor2;

score data=test out=mypreds;

run;

View solution in original post


All Replies
Solution
‎05-12-2017 03:08 AM
SAS Employee
Posts: 187

Re: How to create a predictive model using test and train datasets available

Assuming that your response is binary (eligible vs not), you would be fitting a logistic model. You can use PROC LOGISTIC to fit the model and the SCORE statement in that procedure to get predicted probabilities of eligibility for you test data set.  See the LOGISTIC documentation and examples there such as the "Scoring data sets" example.  Basic code would be like:

 

proc logistic data=train;

model binary_response(event="Y") = predictor1 predictor2;

score data=test out=mypreds;

run;

Frequent Contributor
Posts: 117

Re: How to create a predictive model using test and train datasets available

Thank you for your inputs. I will look into the Logistic documentation.

Grand Advisor
Posts: 9,466

Re: How to create a predictive model using test and train datasets available

Also you could try Decision Tree.

Check PROC HPSPLIT example .

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 98 views
  • 0 likes
  • 3 in conversation