You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
horizon=2*frequency(theDataSet)
train=theDataSet[1:(length(theDataSet)-horizon)] #forecast the last horizon of the series
actuals=theDataSet[(length(theDataSet)+1-horizon):length(theDataSet)]
theDataSet=AirPassengers
frequency(theDataSet)
horizon=2*frequency(theDataSet)
train=theDataSet[1:(length(theDataSet)-horizon)] #forecast the last horizon of the series
actuals=theDataSet[(length(theDataSet)+1-horizon):length(theDataSet)]
reg.data = matrix(rnorm(length(theDataSet)))
reg.train = reg.data[1:(length(theDataSet)-horizon)]
reg.test = reg.data[(length(theDataSet)+1-horizon):length(theDataSet)]
rstanmodel = rlgt(train,
seasonality=frequency(theDataSet),
level.method="seasAvg",
xreg = reg.train,
control=rlgt.control(NUM_OF_ITER=10000))
forec = forecast(rstanmodel, reg.test, h = 24)
Error in regFittedS[(length(regFittedS) - seasonality_int + 1):length(regFittedS)] :
only 0's may be mixed with negative subscripts
The text was updated successfully, but these errors were encountered: