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:)
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.