# RE: st: RE: RE: filling in missing panel data as a trend line

 From "Jason Yackee" <[email protected]> To <[email protected]> Subject RE: st: RE: RE: filling in missing panel data as a trend line Date Sun, 10 Sep 2006 12:09:49 -0700

```Scott, you are correct.  I misinterpreted the -ipolate- help material,
which gives the example " ipolate yvar xvar" as requiring me to use a
theoretically substantive regressor to predict the missing values (so
that, for example, if you were trying to -ipolate- missing values of the
frequency of cavities in children, you would fill in the missing data by
regressing the existing observations of cavities against more plentiful
data on sugary snack consumption).

Nick and Rodrigo posted some code earlier that clarified that I should
simply use my time variable "year" as my "xvar."

Jason

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Scott
Cunningham
Sent: Sunday, September 10, 2006 12:03 PM
To: [email protected]
Subject: Re: st: RE: RE: filling in missing panel data as a trend line

Jason,

It still seems like linear interpolation via -ipolate- gets you what
you need.  My understanding of -ipolate- is that it draws a straight
line between the two points in time.  Here's information about the
methods and formula used to calculate the missing observation, drawn
verbatim from the Stata 8 manual on -ipolate-:

"The value of y at x is found by finding the closest points (x0,y0)
and (x1,y1),such that x0<x and x1>x, where y0 and y1 are observed,
and calculating

y=(y1-y0)/(x1-x0) * (x-x0) + y0

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