Description Usage Arguments Value See Also Examples
Fits Multiplicative AR(1) with Seasonal process model to time series.
1 | fit.mar1s(x, xreg = NULL, seasonal.fun = seasonal.smooth, ...)
|
x |
A univariate time series. |
xreg |
A univariate or multivariate time series of external regressors, or
|
seasonal.fun |
A function which takes a univariate time series as its first argument and returns the estimated seasonal component. |
... |
Additional arguments passed to |
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 |
logresid.sd |
Standard deviation of the residuals. |
decomposed |
An object of class |
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.
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)
|
Loading required package: cmrutils
Loading required package: chron
Loading required package: fda
Loading required package: splines
Loading required package: Matrix
Loading required package: fds
Loading required package: rainbow
Loading required package: MASS
Loading required package: pcaPP
Loading required package: RCurl
Attaching package: ‘fda’
The following object is masked from ‘package:graphics’:
matplot
Loading required package: zoo
Attaching package: ‘zoo’
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
2.5 % 97.5 %
ar1 0.6774523 0.7334565
[1] 0.8567558
2.5 % 97.5 %
ar1 0.6399382 0.6998776
nan2na(y$rest) 0.4305606 0.5716993
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.