Statalist


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

Re: st: extrapolation help


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: extrapolation help
Date   Sun, 30 Aug 2009 12:14:04 -0400

Austin,

thanks for the suggestion

Rich

Austin Nichols wrote:
Richard Goldstein<[email protected]> :
I doubt any approach to this imputation will really be satisfactory,
but you could try multiply imputing some normal errors, e.g.

clear all
input year firm1 firm2 firm3 firm4 firm5 firm6
 1994 949100 429200 479700 . . .
 1995 1216100 835000 561400 . . .
 1996 1434500 1248500 647700 . . .
 1997 2790000 1657500 636300 . . .
 1998 2554100 1635000 692800 . . .
 1999 2643400 1496000 753400 . . .
 2000 3061200 1399400 772000 . . .
 2001 2520400 1432300 874000 . . .
 2002 2361900 . 1008500 . . .
 2003 2202900 . . 449000 . .
 2004 2593000 1437000 907000 430000 . .
 2005 3300000 1511000 809000 453000 . 255000
 2006 2269000 1476000 721000 517000 . 279000
 2007 1840000 1449000 567000 583000 . 369000
 2008 1377000 1358000 651000 603000 2000000 357000
 2009 . . . . . .
end
reshape long firm, i(year) j(id)
replace year=year-1993
qui ta year, g(_y)
drop _y15 _y16
g lny=ln(firm)
xtreg lny _y*, i(id) fe
predict xb
predict u, u
bys id (u): replace u=u[_n-1] if u[_n-1]<.
predict r, e
su r
loc s=r(sd)
set seed 1
forv i=1/10 {
drawnorm e`i', sd(`s')
g h`i'=xb+u+e`i'
}
sort id year
forv i=1/6 {
line lny year if id==`i'||sc h* year if id==`i', name(g`i')
}


On Sat, Aug 29, 2009 at 10:24 AM, Richard
Goldstein<[email protected]> wrote:
Hi,

I have data for several firms for a number of years; however, for most
firms, data for at least one year is missing and, in the extreme, for one
firm, I only have data for 1 year.  I have no other information about these
firms.  I want to extrapolate/interpolate the missing years and I can, I
think, improve the process by using the data for other firms (these firms
are all in the same business and are competitors; their total is not the
total for the industry however, as other firms are in existence during these
year and places). A sample of the data:


   year     firm1     firm2     firm3    firm4     firm5    firm6
   1994    949100    429200    479700        .         .        .
   1995   1216100    835000    561400        .         .        .
   1996   1434500   1248500    647700        .         .        .
   1997   2790000   1657500    636300        .         .        .
   1998   2554100   1635000    692800        .         .        .
   1999   2643400   1496000    753400        .         .        .
   2000   3061200   1399400    772000        .         .        .
   2001   2520400   1432300    874000        .         .        .
   2002   2361900         .   1008500        .         .        .
   2003   2202900         .         .   449000         .        .
   2004   2593000   1437000    907000   430000         .        .
   2005   3300000   1511000    809000   453000         .   255000
   2006   2269000   1476000    721000   517000         .   279000
   2007   1840000   1449000    567000   583000         .   369000
   2008   1377000   1358000    651000   603000   2000000   357000
   2009         .         .         .        .         .        .

there are actually 13 firms but that would not fit on this screen. I want to
replace every "." above with a number. Of the 13 firms, only two have data
for all years thru 2008.

I understand that one possibility would be the vector AR family from
time-series but I am not familiar with this so I am soliciting thoughts on
the usefullness of this technique here.

I am also soliciting thoughts on other techniques (whether available in
Stata or not). Presumably one alternative would be do things in steps, first
extrapolating those missing only 2009, then those missing the next fewest
number of years, etc. and I specifically solicit thoughts on this.

Rich
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index