[R] StructTS fitting problem - can anyone help?

From: John Stollberg <coffeevore_at_hotmail.com>
Date: Thu, 14 Apr 2011 10:58:33 +0000

I have seen a couple of posts about this, but no solutions. The problem is fitting the Basic Structural Model (BSM) to the AirPassengers time series using StructTS.  For this particular time series, if the length is reduced below 140 months, the BSM fits are bad.  The following illustrates the problem
ap0 <- log10(AirPassengers) - 2ap<-ts(ap0[1:139], freq=12)  # bad fits for length < 140(fit <- StructTS(ap, type= "BSM"))ftd<-fitted(fit)plot(cbind(ap, ftd[,1], ftd[,3]), # data, level, cyclic terms     plot.type = "single", col=c("black", "red", "green"))abline(h=0, col="gray60") A plot is attached, for series lengths 139 and 140. The red line is the fitted level and the green line is the seasonal term.  Clearly, for length = 139, the red line does not represent a local average level, and the green line does not represent a zero mean cyclic term with a period of 12 months.   Can anyone help with this?  I've noticed this problem with other time series, and I'm very interested in the solution. John

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. Received on Thu 14 Apr 2011 - 11:01:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Apr 2011 - 11:40:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive