BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vonkraush
Fluorite | Level 6

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 😞

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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.

StatDave
SAS Super FREQ

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 2 replies
  • 1512 views
  • 2 likes
  • 3 in conversation