Re: st: filling in missing values

 From n j cox To statalist@hsphsun2.harvard.edu Subject Re: st: filling in missing values Date Wed, 05 Oct 2005 12:17:07 +0100

I can't speak for STATA. I will answer in terms of Stata.

Scientifically, doing this -- even interpolation rather than
extrapolation -- would seem difficult to
justify on the information given. You are adding
no information and it will be difficult to know what
to make of P-values and figures of model merit.

I would create a time variable which is just
year/5 and then -tsset- and model in terms of that.

If you really want to do this, there isn't a wired-in
Stata solution, but you can get there fairly quickly:

expand 5
bysort country year: replace year = year[1] + _n - 1
replace edu = . if mod(year, 5)
bysort country (year): ipolate edu year, gen(edu2)

Nick
n.j.cox@durham.ac.uk

I have some panel data on educational attainment which is organized in 5-year intervals.
(e.g.

country year edu

UK 1960 10
UK 1965 20
.
.
USA 1960 12
USA 1965 15

etc.)

However, for the particular model I want to estimate, I also need observations in between the intervals (i.e. for 1961, 1962,...). Therefore, I would like to "create" these observations by "extrapolating" them "linearly".

( i.e. by calculating

edu1961 = edu1960 + ((edu1965-edu1960)/5)*1,
edu1962 = edu1960+((edu1965-edu1960)/5)*2 ,
...
edu1997 = edu1995 + ((edu2000-edu1995)/5) * 2 )

Is there some build-in command in STATA for this task or do I have to write a special do-file?

*
* 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/