BookmarkSubscribeRSS Feed
arsinha
Fluorite | Level 6

Hello!

I have a regression model of the form y=B1*x1 + B2*x2 + B3*x3 . There are equal number of observations for all the x variables. Now I want to predict a value of Y with the specific values of x-variables, that are not in the given data set. My question is how do I add values to x1,x2,x3 along with the existing values.  

To be clear, suppose x1,x2,x3 each have 20 values. how do I add the 21st observation for each of them so that i get predicted value of y at those x-points.

I know this is a crude way of getting a predicted value from  a regression model. 

 

Thank You.

2 REPLIES 2
Reeza
Super User

Here's a full write up of two different approaches. 

 

https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html

 

https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model....

 


@arsinha wrote:

Hello!

I have a regression model of the form y=B1*x1 + B2*x2 + B3*x3 . There are equal number of observations for all the x variables. Now I want to predict a value of Y with the specific values of x-variables, that are not in the given data set. My question is how do I add values to x1,x2,x3 along with the existing values.  

To be clear, suppose x1,x2,x3 each have 20 values. how do I add the 21st observation for each of them so that i get predicted value of y at those x-points.

I know this is a crude way of getting a predicted value from  a regression model. 

 

Thank You.


 

Astounding
PROC Star
Do you know how to create a new data set with a new set of values for x1, x2, and x3?

Do you know how to combine two SAS data sets?

Do you know how to add a formula to assign a value to y?

These are all simple things to do. It's just difficult to see which pieces you know and which you don't know.