Hello, I just ran the predict.StructTS function using the AirPassengers data and got a ridiculous result. Here's what I ended up with: http://24.210.155.111/PredictWhat!.pdf Who wrote this? Am I seriously supposed to think this function would accurately predict a time series? -AnalogKid
On 03/08/2011 05:27 AM, Ben Simpkins wrote:> Hello, > > I just ran the predict.StructTS function using the AirPassengers data > and got a ridiculous result. Here's what I ended up with: > http://24.210.155.111/PredictWhat!.pdf > > Who wrote this? Am I seriously supposed to think this function would > accurately predict a time series? > > -AnalogKid > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.Are we seriously supposed to respond to this question? PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Paul -- Paul Hiemstra, MSc Global Climate Division Royal Netherlands Meteorological Institute (KNMI) Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39 P.O. Box 201 | 3730 AE | De Bilt tel: +31 30 2206 494 http://intamap.geo.uu.nl/~paul http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
On 2011-03-07 20:27, Ben Simpkins wrote:> Hello, > > I just ran the predict.StructTS function using the AirPassengers data > and got a ridiculous result. Here's what I ended up with: > http://24.210.155.111/PredictWhat!.pdf > > Who wrote this? Am I seriously supposed to think this function would > accurately predict a time series?If you knew how to use the function correctly, I suppose that it would be reasonable to expect you to trust its output, at least within the limits of uncertainty. Perhaps you could post the code that led you to be so scornful about the efforts of whoever did create the function. It's been my experience that users are often quick to blame the software for their own faulty code. I had no problem obtaining reasonable predicted values for the data.> > -AnalogKidAh, well, perhaps it's just youthful braggadocio. Peter Ehlers> > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
There does seem to be something odd about StructTS, or perhaps the methodology. Try:> data(AirPassengers) > ap <- log10(AirPassengers)-2> (fit <- StructTS(ts(ap[1:138], freq=12), type="BSM"))Call: StructTS(x = ts(ap[1:138], freq = 12), type = "BSM") Variances: level slope seas epsilon 0.000e+00 4.346e-04 6.813e-05 0.000e+00> (fit <- StructTS(ts(ap[1:139], freq=12), type="BSM"))Call: StructTS(x = ts(ap[1:139], freq = 12), type = "BSM") Variances: level slope seas epsilon 0.000e+00 4.363e-04 6.705e-05 0.000e+00> (fit <- StructTS(ts(ap[1:140], freq=12), type="BSM"))Call: StructTS(x = ts(ap[1:140], freq = 12), type = "BSM") Variances: level slope seas epsilon 0.0001521 0.0000000 0.0002667 0.0000000> (fit <- StructTS(ts(ap[1:141], freq=12), type="BSM"))Call: StructTS(x = ts(ap[1:141], freq = 12), type = "BSM") Variances: level slope seas epsilon 0.0001511 0.0000000 0.0002649 0.0000000 The fitted model parameters change fairly dramatically as one increases the length of this time series from 139 to 140. As I recall there was a post about this last month. John>On 2011-03-07 20:27, Ben Simpkins wrote: >> Hello, >> >> I just ran the predict.StructTS function using the AirPassengers data >> and got a ridiculous result. Here's what I ended up with: >> http://24.210.155.111/PredictWhat!.pdf >> >> Who wrote this? Am I seriously supposed to think this function would >> accurately predict a time series? >If you knew how to use the function correctly, I suppose that >it would be reasonable to expect you to trust its output, at >least within the limits of uncertainty. >Perhaps you could post the code that led you to be so >scornful about the efforts of whoever did create the >function. >It's been my experience that users are often quick to >blame the software for their own faulty code. >I had no problem obtaining reasonable predicted values >for the data. >> >> -AnalogKid >Ah, well, perhaps it's just youthful braggadocio. >Peter Ehlers