Re: [R] Regression of a time series on its Quarters

2010-03-18 Thread Achim Zeileis
On Thu, 18 Mar 2010, Gabor Grothendieck wrote: Try this: lm(a.ts ~ factor(cycle(a.ts)) - 1) An equivalent but somewhat more convenient interface is available in "dynlm" where you can say dynlm(a.ts ~ season(a.ts)) or dynlm(a.ts ~ season(a.ts) - 1): R> dynlm(a.ts ~ season(a.ts)) Time serie

Re: [R] Regression of a time series on its Quarters

2010-03-18 Thread Gabor Grothendieck
Try this: lm(a.ts ~ factor(cycle(a.ts)) - 1) On Thu, Mar 18, 2010 at 12:30 PM, Len Vir wrote: > # Dear List, > > # I want to characterize a time series according to its Quarter components. > > # My data ("a.ts": > http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb)  look like: > > #   

[R] Regression of a time series on its Quarters

2010-03-18 Thread Len Vir
# Dear List, # I want to characterize a time series according to its Quarter components. # My data ("a.ts": http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb)  look like: # Qtr1  Qtr2  Qtr3  Qtr4 #   1948 -0.0714961837  0.0101747827  0.0654816569 -0.0227