From: Shawn on 13 Feb 2006 11:08 Hello all.. I'm working on some single variable linear regressions, and would like to compute a confidence interval and a prediction interval for my data. If I compute them by hand, they are coming out different from the clb/cli intervals in SAS. I was told by a friend simply that "SAS doesn't compute prediction and confidence intervals correctly for regressions, but you can trick it into giving you the right values." Can anyone shed more light on this issue, and perhaps point me toward a site or other reference that I can use to understand the difference, and figure out what the "trick" is? Thanks all!
From: Sigurd Hermansen on 13 Feb 2006 15:20 Shawn: Perhaps you are analyzing results of a survey and are using SAS PROC REG instead of SAS PROC SURVEYREG to compute confidence intervals? If so, REG would not calculate confidence intervals correctly, so your friend would be right, though likely for the wrong reasons. See the many postings on this subject by David Cassell. But a simple trick will not make REG estimates of survey estimate confidence intervals come out right. Are you trying to predict a binary outcome and need to convert predictions on a -1,1 scale to predictions on a 0,1 scale? Sig -----Original Message----- From: owner-sas-l(a)listserv.uga.edu [mailto:owner-sas-l(a)listserv.uga.edu] On Behalf Of Shawn Sent: Monday, February 13, 2006 11:09 AM To: sas-l(a)uga.edu Subject: Confidence/Prediction Interval error w/ linear regression Hello all.. I'm working on some single variable linear regressions, and would like to compute a confidence interval and a prediction interval for my data. If I compute them by hand, they are coming out different from the clb/cli intervals in SAS. I was told by a friend simply that "SAS doesn't compute prediction and confidence intervals correctly for regressions, but you can trick it into giving you the right values." Can anyone shed more light on this issue, and perhaps point me toward a site or other reference that I can use to understand the difference, and figure out what the "trick" is? Thanks all!
From: Shawn on 13 Feb 2006 16:50 Thanks for your reply, Sig. Actually I'm just learning SAS, and am dealing with some sample data that was included with it. It's actually simple data that includes the price of automobiles in 1975 and 1985, so I used PROC REG to develop an equation that would allow me to predict an auto's price in 1985 if I knew the 1975 price. I have a background in statistics so I can compute the confidence and prediction intervals by hand, which I did, but just appending 'clb' doesn't produce the right results. That's when I discussed it with my SAS-competent friend and he mentioned the "trick." For example, I know that a specific auto cost $6,400 in 1975, and can easily compute the 1985 price from my parameter estimates. How would I get SAS to give me a 95% prediction interval though? Or even a confidence interval of the mean cost in 1985? The paper and pencil method uses the root MSE, of course, but I'm guessing that SAS does it some other way? Thanks again for teaching an old dog new tricks! Shawn On Mon, 13 Feb 2006 15:20:49 -0500, HERMANS1(a)WESTAT.COM (Sigurd Hermansen) wrote: >Shawn: >Perhaps you are analyzing results of a survey and are using SAS PROC REG >instead of SAS PROC SURVEYREG to compute confidence intervals? If so, >REG would not calculate confidence intervals correctly, so your friend >would be right, though likely for the wrong reasons. See the many >postings on this subject by David Cassell. > >But a simple trick will not make REG estimates of survey estimate >confidence intervals come out right. Are you trying to predict a binary >outcome and need to convert predictions on a -1,1 scale to predictions >on a 0,1 scale? >Sig > >-----Original Message----- >From: owner-sas-l(a)listserv.uga.edu [mailto:owner-sas-l(a)listserv.uga.edu] >On Behalf Of Shawn >Sent: Monday, February 13, 2006 11:09 AM >To: sas-l(a)uga.edu >Subject: Confidence/Prediction Interval error w/ linear regression > > >Hello all.. > >I'm working on some single variable linear regressions, and would like >to compute a confidence interval and a prediction interval for my data. >If I compute them by hand, they are coming out different from the >clb/cli intervals in SAS. I was told by a friend simply that "SAS >doesn't compute prediction and confidence intervals correctly for >regressions, but you can trick it into giving you the right values." > >Can anyone shed more light on this issue, and perhaps point me toward a >site or other reference that I can use to understand the difference, and >figure out what the "trick" is? > >Thanks all!
From: Dale McLerran on 13 Feb 2006 17:13 --- Shawn <kleptein(a)HOTMAIL.COM> wrote: > Thanks for your reply, Sig. Actually I'm just learning SAS, and am > dealing with some sample data that was included with it. It's > actually simple data that includes the price of automobiles in 1975 > and 1985, so I used PROC REG to develop an equation that would allow > me to predict an auto's price in 1985 if I knew the 1975 price. I > have a background in statistics so I can compute the confidence and > prediction intervals by hand, which I did, but just appending 'clb' > doesn't produce the right results. That's when I discussed it with > my > SAS-competent friend and he mentioned the "trick." > > For example, I know that a specific auto cost $6,400 in 1975, and can > easily compute the 1985 price from my parameter estimates. How would > I get SAS to give me a 95% prediction interval though? Or even a > confidence interval of the mean cost in 1985? > > The paper and pencil method uses the root MSE, of course, but I'm > guessing that SAS does it some other way? > > Thanks again for teaching an old dog new tricks! > > Shawn > Shawn, You have not told us what regression procedure you are using nor how you are requesting confidence intervals from said procedure. But let me assume that you are using PROC REG to construct your regression function. Then prediction confidence limits as well as confidence limits for the mean can be obtained employing an OUTPUT statement of the form output out=conf_lim lcl=lcl_pred ucl=ucl_pred lclm=lcl_mean uclm=ucl_mean; I have trouble believing that these confidence limits are not correct. SAS has been around far too long for such to be wrong when the regression model that REG assumes appropriate. If these do not produce what you believe to be the correct limits, then I think you had better be more specific about 1) the data that you have collected and the model that you have fit, 2) the procedure which you fit to obtain your regression function, 3) the options that you have employed in order to get SAS to produce what you state are incorrect confidence limits, and 4) the equations that you employ to produce correct confidence limits. HTH, Dale --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra(a)NO_SPAMfhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 --------------------------------------- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
|
Pages: 1 Prev: Is There a Procedure Like "PROC SURVEYCORR"? Next: A couple of quick PROC GPLOT questions |