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" <>
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

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:
Newcastle University  |

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

*   For searches and help try:

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