[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Type of data (time-series and panel-data)

From   "Thomas Jacobs" <>
To   StataList <>
Subject   st: Type of data (time-series and panel-data)
Date   Sat, 19 Jul 2008 19:13:48 -0500

Beatrice writes:

I have a question concerning the type of data in my dataset.

I have data about five different bonds, with observations for the
time, the date and other variables, such as the bid and ask prices.

I would like to treat my data both as a time-series (i.e. paying no
attention to the type of bond) and as a panel-data.
However, when I use the command tsset I receive this message:
repeated time values in sample

I think that this is due to the fact that I have the same date for
different times and for different variables,because, for example, I
have at the same date a bid price for a given time, an ask price for
the same data and time and so on.

Does anyone know how to solve the problem both for time-series and panel-date?


It is not very clear to me what you wish to do but given a unit of
time, I assume you will want trading days, you can have only one
observation per panel variable, in this case either bond (bond A
midpoint - average of bid and ask) or bond/quote type (bond A/ask,
bond A/bid, etc.).  You may wish to manipulate your data to gather the
last quote bid or ask for each trade day or else the last mid for each
trading day before running tsset.  You may also wish to consider
converting your trading dates to an integer variable trading day
number so there are no gaps in your panel for weekends and trading
holidays.  If you wish to go the other way toward trading day hours or
trading day minutes, you can keep more observations but your panel
will surely be unbalanced unless this is high frequency data.


Thomas Jacobs
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index