Programming the statistical procedures from SAS

Regression Question: Best way to make predictions outside the training dataset?

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Regression Question: Best way to make predictions outside the training dataset?

Hello everyone,

I'm trying to learn the best way to get both predicted values and confidence intervals for observations in a test dataset when you are using a model based on a separate training dataset.  Better yet, what if I'm just working with one dataset, but some of the observations are missing the dependent variable.  How can I get the predicted value/confidence interval for these assuming I have all of the predictor variables present?

In my coursework, I've learned to use Proc Score which does give you the predicted values, but it doesn't get you the confidence intervals.  Is there a way to get this in SAS?

Thanks in advance to anyone that can help!


Accepted Solutions
Solution
‎03-24-2013 07:50 AM
Respected Advisor
Posts: 4,745

Re: Regression Question: Best way to make predictions outside the training dataset?

Look at the OUTPUT statement, it exists for most if not all regression procedures. In proc reg for example, the statistics PREDICTED= LCL=, LCLM=, UCL= and UCLM= will provide the predicted values and confidence intervals (for the mean and for individual observations) for all observations in your dataset, including those with a missing dependent variable value.

PG

PG

View solution in original post


All Replies
Solution
‎03-24-2013 07:50 AM
Respected Advisor
Posts: 4,745

Re: Regression Question: Best way to make predictions outside the training dataset?

Look at the OUTPUT statement, it exists for most if not all regression procedures. In proc reg for example, the statistics PREDICTED= LCL=, LCLM=, UCL= and UCLM= will provide the predicted values and confidence intervals (for the mean and for individual observations) for all observations in your dataset, including those with a missing dependent variable value.

PG

PG
New Contributor
Posts: 4

Re: Regression Question: Best way to make predictions outside the training dataset?

Thank you so much!

I've always tried that, but for two years, I didn't realize that you need a period to denote "missing dependent variable" get an estimate for it.  I feel a lot better about my regression skills in SAS now.  Thanks again for responding!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 214 views
  • 0 likes
  • 2 in conversation