BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
4 REPLIES 4
polingjw
Quartz | Level 8
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.
Paige
Quartz | Level 8
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.
deleted_user
Not applicable
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.
deleted_user
Not applicable
I am still working on estimating a regression model...
Could you help me with my post problem?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2027 views
  • 0 likes
  • 3 in conversation