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?

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 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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