fit.mar1s: Fit Multiplicative AR(1) with Seasonal Process to Data

Description Usage Arguments Value See Also Examples

Description

Fits Multiplicative AR(1) with Seasonal process model to time series.

Usage

1
fit.mar1s(x, xreg = NULL, seasonal.fun = seasonal.smooth, ...)

Arguments

x

A univariate time series.

xreg

A univariate or multivariate time series of external regressors, or NULL.

seasonal.fun

A function which takes a univariate time series as its first argument and returns the estimated seasonal component.

...

Additional arguments passed to seasonal.fun.

Value

An object of class "mar1s" with the following components:

logseasonal

Estimated log-seasonal figure (a univariate or multivariate time series object).

logstoch.ar1

AR(1) with external regressors model fitted for the log-stochastic component (an object of class "Arima").

logresid.sd

Standard deviation of the residuals.

decomposed

An object of class "mar1s.ts" containing decomposed time series (see compose.mar1s).

See Also

compose.mar1s for MAR(1)S process formal definition and composition/decomposition functions, seasonal.ave, seasonal.smooth for seasonal component extraction functions, sim.mar1s for MAR(1)S process simulation and prediction.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(forest.fire, package = "mar1s")
data(nesterov.index, package = "mar1s")

## Simple
mar1s <- fit.mar1s(forest.fire)
plot(mar1s$logseasonal)
confint(mar1s$logstoch.ar1)
mar1s$logresid.sd
resid <- nan2na(mar1s$decomposed$logresid)
qqnorm(resid)
qqline(resid)

## External regressors
mar1s <- fit.mar1s(forest.fire, nesterov.index[, "mean"])
plot(cbind(mar1s$logseasonal, mar1s$logseasonal.r))
confint(mar1s$logstoch.ar1)
resid <- nan2na(mar1s$decomposed$logresid)
qqnorm(resid)
qqline(resid)

aparamon/mar1s documentation built on May 5, 2019, 6:54 p.m.