Programming the statistical procedures from SAS

(Iterable) Out of Sample Forecasting with Probit

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

(Iterable) Out of Sample Forecasting with Probit

[ Edited ]

I am working on my Master's thesis, and am working with forecasting a binary event (ie: NBER-defined recessionary period) with real time data. Currently I am working with a basic probit model (starting with just one lag of one explanatory variable), and I am running into a snag. I need to be able to calculate the parameters for a model using all but the last observation of the data (for a one-period ahead forecast), then see how the last period explanatory model, plugged into the model SAS outputs, would forecast the dependent variable in question. I could do this manually in an individual case, but I am working with a series of hundreds of information sets (each representing the real-time historical data available in a given month) and need to create a series of these forecasts. I believe the term for this is recursive forecasting.

As I also plan on running similar regressions with more lags, I need an automated program which can somehow pull the parameters estimated by the probit regression, then plug the last value of the information set I am working with into them to forecast the dependent variable. I also have need of a way to take the forecasted dependent variable and append it to a worksheet already available in the SAS enviornment (though I expect htis one is actually quite easy, I'm bringing it up because I've spent so much time on the first concern I haven't thought about this one at all).

I have been trying to figure this out for a few days now, but as I'm a complete SAS newb it mostly feels like I'm wading around in the dark. I eventually have to create a program that will iterate over every information set with the model specification, but I want to do that myself, I just need help with the first step of actually utilizing the parameters provided by the model. Any advice on this front would be greatly appreciated! A way to take the model itself on every run and upload it into a series so that I can just combine it and a series of last observations would also work fine.

I also unfortunately can't share my data to give you guys a better idea of what I am dealing with because it is proprietary Smiley Sad


Accepted Solutions
Solution
‎03-23-2017 09:12 PM
SAS Super FREQ
Posts: 3,548

Re: (Iterable) Out of Sample Forecasting with Probit

There are several SAS Sample data sets that you could use to illustrate your ideas without posting proprietary data. For example, Sashelp.Air contains a single time series that you might have studied in school. Sashelp.Stocks contains times series for three stocks. You can also use any of the many sample programs in the SAS/ETS documentation.

 

I suggest you start working with one of these data sets that you can share.  Show us what you have attempted and what you want the output to look like. Then it will be easier to share code that runs on data that we all have access to.

View solution in original post


All Replies
Solution
‎03-23-2017 09:12 PM
SAS Super FREQ
Posts: 3,548

Re: (Iterable) Out of Sample Forecasting with Probit

There are several SAS Sample data sets that you could use to illustrate your ideas without posting proprietary data. For example, Sashelp.Air contains a single time series that you might have studied in school. Sashelp.Stocks contains times series for three stocks. You can also use any of the many sample programs in the SAS/ETS documentation.

 

I suggest you start working with one of these data sets that you can share.  Show us what you have attempted and what you want the output to look like. Then it will be easier to share code that runs on data that we all have access to.

SAS Employee
Posts: 242

Re: (Iterable) Out of Sample Forecasting with Probit

If I understand what you want, this sounds like what PROC LOGISTIC provides when you use the PREDPROBS=CROSSVALIDATE option in the OUTPUT statement.  This provides the predicted probabilities for an observation when that observation is not included in the model. An fast, approximate method is used for obtaining the parameter estimates that would result from each observation being omitted. It is discussed in the "Details: Classification Table: Predicted Probability of an Event for Classification" section of the LOGISTIC documentation.

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 124 views
  • 2 likes
  • 3 in conversation