[R] Time unit in ts() and arima() functions

Jose-Marcio Martins da Cruz Jose-Marcio.Martins at mines-paristech.fr
Sat Feb 12 13:48:14 CET 2011


This question is surely trivial, sorry. I'm afraid I'm misunterpreting 
the information I got with the documentation, and I'm a little bit 
confused. I'm just an engineer with some little skills in statistics.

Well, I have a time series - 600 days long - with some weekly 
periodicity inside. So far, so good.

Well, if I define the time series with, say :

    a <- ts(b, frequency = 7)

and I do "plot(a)", each unit of time seems to be a week, not a day, 
which is coherent with help(ts) which says "frequency: the number of 
observations per unit of time." but this isn't what I want. I'd like to 
retrieve seasonal information but, as I'd like to retrieve also day to 
day information, the time unit should remain one "day".

Also, when I use the "arima(...)" function to fit a model (almost the 
same kind of algorithm which appeared here some days ago), and I specify 
in the "seas=" parameter, "frequency = 7", or "frequency = frequency(a)" 
(a is the time series), I can get arN, maN, sarN, smaN... coefficients. 
What unit shall be applied to these coefficients ? One day or one week ? 
Logically (and ideally), for me, one day for arN and maN and one week 
for sarX and smaX coefficients, but I'm not sure.

I have the same kind of doubt about lag units when I apply the acf() 
function to the time series (a) or the residuals returned by the arima() 
function.

Thanks for your answer.



More information about the R-help mailing list