| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: linear interpolation
Rafal,
Okay, I decided to do it the long way. Add 1,761 observations, and
replacing as the year, one at a time. I think that will work.
Thanks for helping me along this track with that initial email!
sc
On Jul 25, 2006, at 4:20 PM, Scott Cunningham wrote:
Rafal,
I know I need to expand by 31,815 observations (1761 for every year
in the 1980s and 1774 for every year in the 1990s).
. local N = `_N' + 31815
. set obs `N'
obs was 5318, now 31815
What I'm trying to figure out now is to assign values of a year for
every 1761 observations through the 1980s, then 1774 for every year
in the 1990s. For instance, to do this:
year
1981
1981
...
1981
(where the total is 1,761 for 1981, and the same would be for
82-89, and 1774 per year for 1991-1999). I don't think using what
you wrote, ". replace year=1975 + _n if year==." will work since I
do not need year increasing with every observation. Does anyone
know how to fill in missing data with such precision?
sc
*
* 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/
*
* 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/