Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Predicting an event in a dataset from logit parameters (from another d...

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 12-10-2019 02:54 AM
(766 views)

Hi,

I have parameters from a logit model predicting the labor force participation in the dataset lfp.csv. The dataset is produced using the outset statement from proc logit. The model is stratified by sex (0 1) and has some interaction variables (edu*grage). I want to use those parameters to predict the probability of the event to individuals in another dataset pop_2010 (which is not the dataset used to estimate parameters).

I read that the proc score can only work with parameters from linear regression, but not with logit. The store statement within the proc logit cannot be used too, since I don’t want to predict on the same dataset (and the prediction should be done without having access to the dataset used to estimate parameters).

Is there a way to do it quick and short?

9 REPLIES 9

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Check either the CODE statement in PROC LOGISTIC (logit isn't a proc as far as I know so assuming you're referring to logistic). I think GLM has a similar statement.

https://documentation.sas.com/?docsetId=statug&docsetVersion=15.1&docsetTarget=statug_logistic_synta...

Or use PROC PLM and make sure to specify that the iLink option.

https://blogs.sas.com/content/iml/2019/02/11/proc-plm-regression-models-sas.html

And a few more worked examples of scoring data for logistic regression:

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Is it possible to use a csv file for parameters in the restore statement of proc PLM?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

No idea, but if you have a CSV files why not just write a basic data step? The formula is pretty straightforward for logistic regression. If you can re-run the code to develop the model, the CODE option will create the data step for you.

Here's an example of how you can replicate it from scratch if you have to.

https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-f...

Rather than drive from the proc logistic output, you can drive it from the imported CSV file. though you may need to restructure the file to get it as needed.

Here's an example of how you can replicate it from scratch if you have to.

https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-f...

Rather than drive from the proc logistic output, you can drive it from the imported CSV file. though you may need to restructure the file to get it as needed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

FYI - this isn't correct, you can use the STORE statement to score the model with a new data set.

The store statement within the proc logit cannot be used too, since I don’t want to predict on the same dataset (and the prediction should be done without having access to the dataset used to estimate parameters).

The store statement within the proc logit cannot be used too, since I don’t want to predict on the same dataset (and the prediction should be done without having access to the dataset used to estimate parameters).

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You should be allowed to extract your code though, including the scoring code generated from a CODE statement? That's not any different than taking the parameter estimates out.

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

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.