Help using Base SAS procedures

Out of sample predictions

Reply
N/A
Posts: 0

Out of sample predictions

Once I've estimated a regression model, how do I use that model to make out of sample predictions for y-hat. I have a large number of MSA dummy variables (202), so creating a new variable that manually calculates that value would be very tedious and vulnerable to human error.

Any help would be greatly appreciated.

Thanks,

Jim
Regular Contributor
Posts: 171

Re: Out of sample predictions

You need to create a data set with the values of the independent variables that you want to make predictions for, concatenate this data with the original data set (leaving the value of the response variable as missing), then rerun the regression model specifying the P option in the model statement.
Super Contributor
Posts: 281

Re: Out of sample predictions

And after you follow polingjw's advice, keep your fingers crossed that the predicted values mean anything.

If you really have 202 dummy variables, I'm skeptical that any such prediction of out of sample values will have meaning. More than likely, you will be extrapolating, in other words, predicting in a region of X-space where you have no data.
N/A
Posts: 0

Re: Out of sample predictions

Thanks for your help!

The model is an MSA fixed effects model (thus the 200 MSA dummies). I have 142,000 observations in my sample and 38,000 in the sub-sample where the model is estimated.

I have the y-values for the entire sample, I just want to see if the predicted values from the sub-sample model are close to the values in the entire sample.

Not sure if this changes anything.
N/A
Posts: 0

Re: Out of sample predictions

I am still working on estimating a regression model...
Could you help me with my post problem?
Ask a Question
Discussion stats
  • 4 replies
  • 118 views
  • 0 likes
  • 3 in conversation