otm(y, h=5, seasonal=NULL, theta=NULL,
g="sAPE", n1=length(y)-h, m=floor(h/2), H=h, p=1+floor((length(y)-n1)/m),
thetaList=seq(from=1,to=5,by=0.5), tLineExtrap=ses, mc.cores=1, ...)
thetaM(y, h=5, seasonal=NULL)
TRUE
, the multiplicative seasonal decomposition is used.
If NULL
, quarterly and monthly time series are tested for statistically seasonal behaviour, with 95% of significance. Default is NULL.theta = NULL
the theta parameter is estimated using the Generalised Rolling Origin Evaluation.groe
function for select the theta
value in estimation process.
The possibility values for g
is "sAPE", "APE", "AE"
and "SE"
.
If theta
theta
argument is not NULL
.theta
argument is not NULL
.theta
argument is not NULL
.theta
argument is not NULL
.
Default is the maximum, i.e., p=1+floor((length(y)-n1)/m)
.theta
. This argument is not used if theta
argument is not NULL
.ses
.mc.cores > 1
on Windows SO.tLineExtrap
.theta = 1
the tLineExtrapModel
method is computed.
If theta = 2
so the Standard Theta Method of Assimakopoulos and Nikolopoulos (2000) is computed.forecTheta-package
, groe
, forecast
, ses
y1 = 2+ 0.15*(1:20) + rnorm(20,2)
y2 = y1[20]+ 0.3*(1:30) + rnorm(30,2)
y = as.ts(c(y1,y2))
otm.fit <- otm(y=as.ts(y[1:40]), h=10)
plot(y)
points(otm.fit$fitted, type = "l")
points(otm.fit$mean, type = "l", col="blue")
Run the code above in your browser using DataLab