Statalist The Stata Listserver


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

Re: st: linear interpolation


From   [email protected]
To   [email protected]
Subject   Re: st: linear interpolation
Date   Tue, 25 Jul 2006 15:26:56 -0500

Perhaps -tsfill- would help?

Scott

----- Original Message -----
From: Scott Cunningham <[email protected]>
Date: Tuesday, July 25, 2006 3:21 pm
Subject: st: linear interpolation
To: [email protected]

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

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



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