Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Standard error of a sum


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: Standard error of a sum
Date   Thu, 15 Jun 2006 10:58:57 +0100 (BST)

Nick Cox wrote:

> I think Clive meant -summarize, detail-.

Later, Jeph Herrin wrote:

> That "option display is not allowed"....

> You mean 'detail', of course.

Yes, indeed I did; I apologise for misleading Meloria. All those late
nights...

One could calculate the standard error of her composite of two forecasted
values from her two -arima- models manually using -gen- and -egen-, but I
can only get there in five:

. clear

. webuse wpi1

. g bob=invnorm(uniform())

. quietly arima wpi bob, ar(1)

. predict m1

. quietly arima ln_wpi bob, ar(1)

. predict m2

. g m=m1+m2

. egen sdm=sd(m)

. g sqrtn=sqrt(_N)

. g sem=sdm/sqrtn

. codebook sem

When I did it, Stata computed the same value for every observation, and
that's exactly what you want.

Hope that helps.

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index