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   "Jacobs, David" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: cubic spline interpolation in panel data
Date   Mon, 4 Apr 2011 17:06:36 +0000

The econometric program called EViews offers about four different ways to estimate data at a higher frequency from data at a lower one.  This set of programs is implemented for (one case) time series only, but you probably could program EViews to handle this with panel data.

D. Jacobs

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ben Ammar
Sent: Monday, April 04, 2011 12:12 PM
To: [email protected]
Subject: Re: st: cubic spline interpolation in panel data

Hi Nick,

thanks for your answer. You're right, the statistical approach of interpolating the data isn't the best choice but unfortunately the data is only available on a quarterly basis.

I just used the command that you mentioned as follows:
-by group: csipolate price date, gen(price2)-

I generated missing values between the quarterly dates through -tsfill-
and everything also works fine -ipolate- and -cipolate-.
But with -csipolate- I receive this:
               spline3():  3201  x[0,0] found where vector required
             csipolate():     -  function returned error
                 <istmt>:     -  function returned error

I have no idea why that happens. The help-menu does not indicate any further information for the -csipolate- command. Am I missing additional information?

Regards Ben

-------- Original-Nachricht --------
> Datum: Mon, 4 Apr 2011 16:08:15 +0100
> Von: Nick Cox <[email protected]>
> An: [email protected]
> Betreff: Re: st: cubic spline interpolation in panel data

> 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 <[email protected]> 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:
> *
> *
> *

GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat!
*   For searches and help try:

*   For searches and help try:

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