[R] Problem with the command "StrucTS" that fits a basic structural model for time series

Gabor Grothendieck ggrothendieck at gmail.com
Sat Jun 2 19:10:29 CEST 2007


Your frequency is 1.  Suppose it were 3 :

> (fit <- StructTS(ts(x, freq = 3),type = "BSM"))

Call:
StructTS(x = ts(x, freq = 3), type = "BSM")

Variances:
  level    slope     seas  epsilon
 3.0225   0.0000   0.1617  18.0978

On 6/2/07, hassen62 at voila.fr <hassen62 at voila.fr> wrote:
> Hi everybody,
> I'am very interested with the basic structural model of time series. So I used the command "StructTS" but I failed to obtain a desirable output, in fact when I write in R Console the following lines:
> > x=(1,2,3,4,5,2,25,14,12,13,11,6,9,24,12,13,14,12,12,14,11,12,14,15,20,21,22,23,21,25,28)
> >(fit <- StructTS(x,type = "BSM"))
> I obtained the following message:"error in makeBSM(x, nf): the frequency has to be  positif  entire for BSM"
> I would like via this command(StrucTS) obtain estimation of seasonality and local level trend components of the time series "x".
> Can you help me please . Thanks.
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list