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

Re: st: Filling missing values

From   Maarten buis <>
Subject   Re: st: Filling missing values
Date   Mon, 1 Feb 2010 00:30:50 -0800 (PST)

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

--- On Sun, 31/1/10, Song wrote:
> I would like to fill the missing value in var1 based on the
> trend of the same variable (=var1) instead of using additional
> independent variable. However, "ipolate" requires an independent 
> vvariable. How can I fill the  missing value based on the trend
> of the variable itself? I would like to use exponential decay
> for var1, but a linear trend is also fine.

For a trend to exist there needs to be time, this is true of linear
trend or exponential decay, so "the variable itself" cannot have a
trend. This is the reason why -ipolate- requires an independent 
variable. If you know that the observations are measured at equal 
intervals and that the observations are sorted on that time axis, 
then you can create such a "time" variable by typing gen -t = _n-.
If this is not the case and there is no time variable in your 
data, then it is logically impossible to recover the trend. 

Hope this helps,


*   For searches and help try:

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