Statalist


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

st: Re: Filling missing values


From   Jorge Eduardo Perez Perez <[email protected]>
To   Song <[email protected]>
Subject   st: Re: Filling missing values
Date   Sun, 31 Jan 2010 19:05:35 -0500

If the data is ordered by id, the variable id itself is the trend and
you can use as your independent variable to interpolate:

ipolate var1 id, gen(var1i)

_______________________
Jorge Eduardo Pérez Pérez

On Sun, Jan 31, 2010 at 6:25 PM, Song <[email protected]> wrote:
>
> Dear all,
>
> 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 variable. 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.
>
> id  var1
> 1    45
> 2    37
> 3    32
> 4    31
> 5    17
> 6
> 7    3
> 8    1
>
> Thank you in advance.
> Mike.
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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