Hello, I use PROC REG for Multiple Linear Regression. Is there an integrated way to apply the model to a test sample or get the comlete equation (B0+B1*X1+B2*X2...) when there is a considerable number of variables? Thanks.
@gabriel_k wrote:
Hello, I use PROC REG for Multiple Linear Regression. Is there an integrated way to apply the model to a test sample
I don't know what "test a sample" means but I am going to guess (always a dangerous thing) that you really mean get predicted values for certain observations. This can be done using the OUTPUT statement in PROC REG. If the observation(s) you want to predict is not in the original data set used to create the regression, then you can append this observation(s) to the data set before you create the regression, leave the response variable missing, and the predicted value for this observation(s) will be in the OUTPUT data set.
The equation is contained in the data set created by the OUTEST option.
@gabriel_k wrote:
Hello, I use PROC REG for Multiple Linear Regression. Is there an integrated way to apply the model to a test sample
I don't know what "test a sample" means but I am going to guess (always a dangerous thing) that you really mean get predicted values for certain observations. This can be done using the OUTPUT statement in PROC REG. If the observation(s) you want to predict is not in the original data set used to create the regression, then you can append this observation(s) to the data set before you create the regression, leave the response variable missing, and the predicted value for this observation(s) will be in the OUTPUT data set.
The equation is contained in the data set created by the OUTEST option.
Thanks.Good guess:)
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.