Statalist The Stata Listserver

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

st: linear interpolation

From   Scott Cunningham <>
Subject   st: linear interpolation
Date   Wed, 19 Jul 2006 13:35:25 -0400

I have data from the 1980, 1990 and 2000 Census, and need to linearly interpolate the in-between years (1981-1989, 1991-2001, 2002-2005). For now, I am assuming a constant rate of growth each year. Let D80 equal the 1980 value, D90 equal the 1990 value and r be the rate of growth per year. Solving this means solving the following equation for r:


I had two questions. How do I create a panel for 1981-1989, 1991-1999, 2001-2005 to insert these missing values? Assume the data is in this format:

1980 100 1
1980 3 2
1990 200 1
1990 4 2

I want to create YEAR values for 1981-1989, etc., and then after doing that, create corresponding estimates for each state. This means calculating two different values for r, and then using that value to estimate each of the missing years. I think I will need to use the -expand- command, but I wasn't sure if there was a simple way to do this, such as with an ado file already created for exactly this sort of thing.


* For searches and help try:

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