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

Re: st: CI for growth rate

From   "Austin Nichols" <>
Subject   Re: st: CI for growth rate
Date   Mon, 21 Apr 2008 10:34:47 -0400

Martin Weiss <>:
-ratio- is for the ratio of means, not the mean of ratios.  Are these
panel data with multiple observations on individuals?  I assume so.
In that case, just calculate the ratio, or the percentage growth,
directly, and then use -ci- or alternatives:

webuse psidextract, clear
keep if t>5
g w=exp(lwage)
keep id t lwage w
reshape wide w lwage, i(id) j(t)
ratio w7/w6
g pcg=100*(w7-w6)/w6
la var pcg "Percentage growth in wage rate"
ci pcg
kdensity pcg
su pcg, d

Note that the ratio of means is not equal to the mean of ratios
(generically). Also note there will be a long right tail and probably
no large negative values, so the median will be a better measure of
"typical" wage growth than the mean. Also, how will you deal with
individuals who have no observed wages in one of the two years? Both
years?  Or an observed wage rate of zero (volunteers)?  Or multiple
observed wage rates (at multiple jobs)?

Your question makes me think you've got "wide" data, so I -reshape-d
the data in the example above to wide form.  It's usually better to
keep panel data in long form, like so:

webuse psidextract, clear
g w=exp(lwage)
bys id (t): g pcg=100*(w-L.w)/L.w
la var pcg "Percentage growth in wage rate"
g g=_n-51 in 1/200
la var g "Percentage growth in wage rate"
forv t=2/7 {
 kdensity pcg if t==`t', at(g) gen(d`t') bw(1) nogr
line d? g, leg(off) xla(-50(10)100)
su pcg if t==7, d

On Mon, Apr 21, 2008 at 7:16 AM, Martin Weiss
<> wrote:
> Dear Statalisters,
> if I had wage data for two years, say 1999 and 2000, and wanted a CI for the
> growth rate of wages, would it be correct to let -ratio- calculate the ratio
> between the two years (which would yield something like 1.0342, denoting a
> 3.42% growth rate), take the CI from ratio and subtract one? So if ratio
> returned a CI of [1.023;1.044], would the CI for the growth rate be 2.3% to
> 4.4%? Or am I missing something?
*   For searches and help try:

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