Das ...
Argument von tbats
wird auto.arima
,
...: Additional arguments to be passed to ‘auto.arima’ when
choose an ARMA(p, q) model for the errors. (Note that
xreg will be ignored, as will any arguments concerning
seasonality and differencing, but arguments controlling
the values of p and q will be used.)
an der Dokumentation übergeben werden Blickt man von der Dokumentation (?tbats
)
für
auto.arima
wir sehen, dass es Argumente zum Einstellen der Werte für und
q
.
auto.arima(y, d = NA, D = NA, max.p = 5, max.q = 5, max.P = 2,
max.Q = 2, max.order = 5, max.d = 2, max.D = 1, start.p = 2,
start.q = 2, start.P = 1, start.Q = 1, stationary = FALSE,
seasonal = TRUE, ic = c("aicc", "aic", "bic"), stepwise = TRUE,
trace = FALSE, approximation = (length(x) > 150 | frequency(x) > 12),
truncate = NULL, xreg = NULL, test = c("kpss", "adf", "pp"),
seasonal.test = c("ocsb", "ch"), allowdrift = TRUE, allowmean = TRUE,
lambda = NULL, biasadj = FALSE, parallel = FALSE, num.cores = 2,
x = y, ...)
Also, für die Arbeit hinzugefügt Sie tun, die Argumente start.p
, start.q
und trace
zum tbats
Aufruf, die Startwerte zu kontrollieren und die Suche zu sehen. Das beste Modell in diesem Beispiel ist ARIMA(0, 0, 0) with zero mean
. Die BATS(0, {0,0}, 0.979, -)
sagt uns die Werte {p, q} = {0, 0}
wurden ausgewählt.
library(forecast)
omega <- USJudgeRatings[,1]
tbats(y = omega,
use.box.cox = TRUE,
use.trend = TRUE,
use.damped.trend = TRUE,
use.arma.errors = TRUE,
start.p = 3,
start.q = 2,
trace = TRUE)
#
# ARIMA(3,0,2) with non-zero mean : Inf
# ARIMA(0,0,0) with non-zero mean : -55.63664
# ARIMA(1,0,0) with non-zero mean : -53.50348
# ARIMA(0,0,1) with non-zero mean : -53.47905
# ARIMA(0,0,0) with zero mean : -57.75828
# ARIMA(1,0,1) with non-zero mean : -51.19495
#
# Best model: ARIMA(0,0,0) with zero mean
#
# BATS(0, {0,0}, 0.979, -)
#
# Call: tbats(y = omega, use.box.cox = TRUE, use.trend = TRUE, use.damped.trend = TRUE,
# use.arma.errors = TRUE, start.p = 3, start.q = 2, trace = TRUE)
#
# Parameters
# Lambda: 0
# Alpha: -0.04239053
# Beta: 0.04362955
# Damping Parameter: 0.978616
#
# Seed States:
# [,1]
# [1,] 1.917976
# [2,] 0.017468
#
# Sigma: 0.1206409
# AIC: 163.774
Es wäre einfacher, Ihnen zu helfen, wenn Sie ein [reproduzierbares Beispiel] zur Verfügung gestellt (https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) Anhand der Beispieldaten und des Codes wird versucht, klarzustellen, was Sie zu tun versuchen. – MrFlick