Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: cubic spline interpolation in panel data

From   Nick Cox <>
Subject   Re: st: cubic spline interpolation in panel data
Date   Mon, 4 Apr 2011 16:08:15 +0100

I think there are two distinct issues here.

First, -csipolate- (SSC) is a wrapper for a relative of the Mata
function you mention, so that is a positive for you.

It's a cousin of -cipolate- (SSC), which you mention, but without
giving its source. It would be more accurate to say that it supports
-by:- than it knows about panel data as such, but the distinction
should not bite you.

Second, what you mean by interpolation? If you have prices that are
averaged in some way over quarters, no interpolation process will put
back detail that has been lost. If you have prices that are measured
once a quarter, say 1 Jan 2011, 1 Apr 2011, etc., then clearly you can
apply interpolation, although its appropriateness for price variation
seems moot to me.

On Mon, Apr 4, 2011 at 3:57 PM, Ben Ammar <> wrote:
> Hi everyone,
> I was wondering if there's any possibility to use spline3() with Mata if the dataset is in panel form (400000 observations, 40 years)?
> Currently I have quartely dates with prices but I would like to interpolate those prices on a monthly basis.
> -ipolate- works fine but I'm trying to smooth the data as much as possible.
> I also installed -cipolate- but I just read it's not a spline function.
> Does anyone have an idea how to use the spline3() with panel data (-reshape- the dataset came to my mind, but I don't think that is would help somehow + I'm using Stata IC, which could be tight due to 40 years of observations)or perhaps does someone have another way to approach the interpolation on a monthly basis?

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index