On Sat, 27 Feb 2016, Marc O'Callaghan wrote:
Dear all,
I have a time series, which comprises 31 observations per year (actually
the observations for March, set in a time series with periodicity 31).
My wish is to compact it to the daily average, i.e. end up with 31
observations, each of which represents the average value of that date
throughout the available years. I therefore sought to compact it with
"dataset compact 31", to which I was told "This conversion is not
supported". I then tried other conversions, but it appears no expansion
or compaction is accepted at all.
I assume this is due to the unorthodox periodicity, but my question is
then: how can I successfully compact my data into 31 average values ?
The simplest way would be, I think, to redefine your dataset as a panel
dataset, with the day as unit variable and the year as time bariable and
then use the pmean() function.
Or otherwise, you could use the aggregate() function to create a matrix
that you re-use as the starting point of your new dataset.
HTH,
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------