BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Statistics91
Calcite | Level 5

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!

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

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

2 REPLIES 2
PGStats
Opal | Level 21

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
Statistics91
Calcite | Level 5

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!

sas-innovate-2024.png

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.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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