Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: RE: getting the standard deviation of predictions


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: RE: RE: getting the standard deviation of predictions
Date   Fri, 26 Nov 2010 12:28:41 +0000

I agree. Thanks, 

Nick 
[email protected] 

Garry Anderson

Nice solution Nick in making two plots to show the difference betwen stdp and stdf.
 
I think an improved way to plot the graphs is to reverse the -scatter- and -lfitci- so that all the data points appear above the zone labeled '95% CI', rather than some being hidden by this zone.
 
twoway lfitci gpm weight, stdp || scatter gpm weight
twoway lfitci gpm weight, stdf || scatter gpm weight
 
Nick Cox

Tunga's main problem appears to be that different books tell him different things, but without any references I cannot comment except to say that I believe him. Also, this is one area in which even if the books are consistent, which as said seems unlikely, it is highly unlikely that the words "prediction" and "forecast" match everyone's private and personal distinctions. (You need not care or agree, but for me if anything a forecast implies of unknown future and a prediction implies of unknown, future or not.)

To paraphrase a famous mathematician, in order to solve this problem we go round it.

Trying to clarify and correct, step by step:

1. These are options, not commands.

2. They were not introduced in Stata 11. It's a big jump from "I don't remember seeing this before" to "it must be new" but in any case these options go way back. I can't find earlier manuals at the moment, but they go back to Stata 3 at least.

3. As Tunga is evidently using Stata 11, the whole question of terminology can be sidestepped. [R] pp.1578-9 give the formulas.

4. Alternatively, experiment. Examples like

. sysuse auto
(1978 Automobile Data)

. gen gpm = 1/mpg

. scatter gpm weight || lfitci gpm weight, stdp

. scatter gpm weight || lfitci gpm weight, stdf

and comparison with your favoured textbooks will let you map your terminology onto Stata's.

Nick
[email protected]

Tunga Kantarci

I would like to ask a question about the stdp and stdf commands.

My aim is to calculate a confidence interval for a prediction. For this I
need the standard deviation of the prediction.

My aim is "not" to calculate a prediction interval. For this I would have
needed the standard deviation of the prediction error.

Hence, I simply wish to get the standard deviation of the prediction.

I follow these steps:

1. regress y x z

2. predict yhat, xb

3. predict stdvyhat, stdp

Now at this point I would like to ask the difference between the stdp and
stdf options. As far as I understand

stdp gives the standard error of the prediction stdf gives the standard
error of the prediction error

My question: Could you please confirm that "stdp" indeed gives the standard
deviation of the prediction? I am a bit confused because one book says
actually that "stdf" gives "the standard error of the forecast". And
actually I thought so far that "stdf" gives the standard deviation of a
prediction. I was never aware of the "stdp" command. I now suspect that the
stdp is a new command that appeared with Stata 11.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index