Can arima() or sarima() be used for additive seasonal data? - r

I have searched about arima() and sarima() function and found out that those functions work for multiplicative seasonal data. My data has additive seasonality, is there any function that would work for additive seasonal data?
I'm looking for your help, thank you!

Related

Time series forecast from a multinomial regression in R

I have ran a multinomial regression model with multiple independent variables and interactions.
Next, I would like to use this multinom model to predict future values of my outcome variables based on past values.
My end goals is to have a line graph with my predicted outcome versus time from my multinom model and future predictions for the next, let's say, 10 years if all other variables are help constant.
I know of the forecast() function in R, but I believe that would be for linear models, but mine is a multinomial. Any advice on how to proceed?
Thank you.

Does auto.arima function in R do the differencing for the y- and x-variables before or after estimating the linear regression model?

I'm trying to estimate a linear regression with arima errors, but my regressors are highly collinear and thus the regression model suffers from multicollinearity. Since my ultimate goal is to be able to interpret the individual regression coefficients as elasticities and to use them for ex-ante forecasting, I need to solve the multicollinearity somehow to be able to trust the coefficients of the regressors. I know that transforming the regressor variables eg. by differencing might help to reduce the multicollinearity. And I have also understood that auto.arima performs the same differencing for both the response variable as well as the regressors defined in xreg (see: Do we need to do differencing of exogenous variables before passing to xreg argument of Arima() in R?).
So my question is, does it do the transformation already before estimating the regression coefficients or is the regression estimated using the untransformed data and transformation done only before fitting the arima model to the errors? And if the transformation is done before estimating the regression, what is the script to get those transformed values to a table or something, to be able to run the multicollinearity test on those rather than the original data?
The auto.arima() function will do the differencing before estimation to ensure consistent estimators. The estimation of the regression coefficients and ARIMA model is done simultaneously using MLE.
You can manually difference the data yourself using the diff() function.

How to get the time varying coefficients using dlmFilter in dlm package on R?

I've tried to use dlm package on R to forecast with Kalman Filter.
My model is like this, using five variables:
build <- function(u) {
reg <-dlmModReg(vars[,1:5], start=startM, end=endM, dV=exp(u[1]), dW=exp(u[2:7]))
return(reg)
}
I can get time varying coefficients when MODELING. However, when I try to forecast, the coefficients in the result gets constant only in the forecasting part like this: https://www.dropbox.com/s/boig4ln5acxrtra/coefficients.png
I use the following way to predict.
Gaussian state space forecasting with regression effects
https://stats.stackexchange.com/questions/5090/gaussian-state-space-forecasting-with-regression-effects
So, if anyone know how to get time-varying coefficients in dlmFilter to forecast, please let me know. I appreciate your help. Thanks.

Forecasting from a time series mixture model which is an average of other models

I'm trying to fit a mixture model to a time series in order to do forecasts (averaging an arima, an ets and an stlf model).
Is there an R package that can handle this?
I've managed to find a number of packages that can handle mixture models, but they do not include forecasting.
In case there is no such package, is there a nice way to calculate the prediction intervals (the forecasts themselves will just be the average of the means).
Thanks!

Variance of a Time Series Fitted to an ARIMA Model

I think this is a basic question, but maybe I am confusing the concepts.
Suppose I fit an ARIMA model to a time series using, for example, the function auto.arima() in the R forecast package. The model assumes constant variance. How do I obtain that variance? Is it the variance of the residuals?
If I use the model for forecasting, I know that it gives me the conditional mean. I'd like to know the (constant) variance as well.
Thank you.
Bruno
from the arima() help I see
sigma2
the MLE of the innovations variance.
var.coef
the estimated variance matrix of the
coefficients coef, which can be extracted
by the vcov method.
It seems like which you want will depend on your model. I am pretty sure you want sigma2.
to get the sigma2 do:
?arima
x=cumsum(rcauchy(1000))
aax=auto.arima(x)
str(aax)
aax$sigma2

Resources