Thanks Patrik, Great. It works too. Gregor -----Original Message----- From: Patrick Burns [mailto:pburns at pburns.seanet.com] Sent: Freitag, 6. Dezember 2002 17:32 To: Gregor Gawron Subject: Re: [R] ts startdate I just realised that I had the English wrong in my message to you -- it should be: what you want minus one NOT one minus what you want Pat
Gregor Gawron wrote:
Dear R-users, I am facing a trivial problem when trying to parameterise the start date of a time series object. I am working with monthly data (104) performing n-steps-ahead (6) forecasts and using a fixed window size (36). At the end of calculations I have a list that contains 69 forecasts. I have no problems in fixing the window size by parametrization, e.g. k<- control variable in a for loop my.length<-36 past<-window(X,start=c(1980,k - my.length + 1),end=c(1980,k)) The integer defining the month number can be arbitrary set to: 6,16,46 etc and it always works. This, however, does not work when I try to parameterise the start date of the result list my.forecasts<-unlist(my.result.list) my.forecast.results<-ts(my.forecasts,start=c(1980,my.length+6),frequenc
y
=12)
The message I recive is:
Error in ts(my.frecasts, start = c(1980, my.length + 6), frequency =
12)
:
invalid start
It seems that it works only for month integer up to 12. Does someone
know how to overcome this problem? Many thanks in advance.
I am using R 1.5.1 on Windows 2000
---
Gregor Gawron
______________________________________________ R-help at stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help