turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Predictive Model based on Logistic Regression Mode...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2017 03:37 PM

Hello,

I am currently working with the Titanic_train dataset, which lists that survival of different passengers aboard the Titanic. I'm trying to take a logistic regression model I fit to that dataset and use it to predict the survial probabilities of a different dataset (Titanic_test). So far I have figured out the first part, the logistic regression model for the train dataset, with my code posted:

ods graphics on;

proc logistic data=TitanicTrain plots(only)=(roc(id=obs) effect);

model survived(event='1')=age male family passenger_class

/scale=none clparm=both clodds=both;

run;

However, I can't figure out how to take that model and and use it on the other dataset. For clarification, the second dataset doesn't tell me wether the passenger survived or not. I'm trying to predict that. I honestly don't know where to start on this problem and any help would be appreciated.

Accepted Solutions

Solution

06-29-2017
02:32 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2017 03:53 PM

http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html

Please do not post the same question multiple times, I'll merge them into one here.

What you're looking to do is called scoring a model and there are several ways to do so. The blog post in the link above shows the different methods with sample code.

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2017 03:48 PM

Hello,

I am currently working with the Titanic_train dataset, which lists that survival of different passengers aboard the Titanic. I'm trying to take a logistic regression model I fit to that dataset and use it to predict the survial probabilities of a different dataset (Titanic_test). So far I have figured out the first part, the logistic regression model for the train dataset, with my code posted:

ods graphics on;

proc logistic data=TitanicTrain plots(only)=(roc(id=obs) effect);

model survived(event='1')=age male family passenger_class

/scale=none clparm=both clodds=both;

run;

However, I can't figure out how to take that model and and use it on the other dataset. For clarification, the second dataset doesn't tell me wether the passenger survived or not. I'm trying to predict that. I honestly don't know where to start on this problem and any help would be appreciated.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-24-2017 06:00 PM

Scoring, which is what you want, is especially easy with PROC LOGISTIC. Just use the SCORE statement. Details in example:

Solution

06-29-2017
02:32 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2017 03:53 PM

http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html

Please do not post the same question multiple times, I'll merge them into one here.

What you're looking to do is called scoring a model and there are several ways to do so. The blog post in the link above shows the different methods with sample code.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-23-2017 04:02 PM

Thank you for your help and I'm sorry about posting it multiple times.