Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Is there a quick way of customizing linear interpolation?

From   Halit Akturk <>
Subject   st: Is there a quick way of customizing linear interpolation?
Date   Sat, 17 Jul 2010 20:40:30 -0500

Hi all,
I am a Stata 11 user. Is there any way to customize ipolate command in
Stata in a quick way? I like to do linear interpolation but I have a
constraint. I like to fill in the missing observations as long as the
missing observations happen at most 2 times consequtively. For
instance, say I have the following data where "." stands for missing
1, 4, 5, ., 7, ., ., ., 9, ., ., 15.
The usual Stata's ipolate gives: 1, 4, 5, 6, 7, 7.5, 8, 8.5, 9,11, 13, 15.
The ipolate will fill in all of the missing observations. I don't
wanna do that. I like to fil in the missing values as long as they are
at most 2 observations consequtively. So the customized linear
interpolation (which is what I am looking for) should give me the
following result:
1, 4, 5, 6, 7, ., ., ., 9, 11, 13, 15. I hope I explained what I am
looking for well.

I will appreciate any help. Thank you...

Halit Akturk
Department of Economics
Vanderbilt University
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index