Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/ARMA.studentt.ff.R

For an ARMA model, estimates a 3–parameter
Student-*t* distribution characterizing the errors
plus the ARMA coefficients by MLE usign Fisher
scoring. Central Student–t handled currently.

1 2 3 4 5 6 7 8 9 |

`order` |
Two–entries vector, non–negative. The order $u$ and $v$ of the ARMA model. |

`zero` |
Same as |

`cov.Reg` |
Logical. If covariates are entered, Should these be
included in the ARMA model as a |

```
llocation, lscale, ldf, ilocation,
iscale, idf
``` |
Same as |

The normality assumption for time series analysis is relaxed to handle
heavy–tailed data, giving place to the ARMA model with shift-scaled
Student-*t* errors, another subclass of VGLTSMs.

For a univariate time series, say *y[t]*,
the model described by this VGLTSM family function is

*
y[t] = β[0] + β[1] y[t - 1] + … + β[p] y_[t - p] + e[t]+
φ[1] e[t - 1] + … φ[q] e[t - q],
*

where *e[t]* are distributed as
a shift-scaled Student–*t*
with *ν* degrees of freedom, i.e.,
*e[t] ~ t(ν[t], μ[t], σ[t])*.
This family functions estimates the location (*mu[t]*),
scale (*σ[t]*) and degrees of freedom (*ν[t]*)
parameters, plus the ARMA coefficients by MLE.

Currently only centered Student–t distributions are handled. Hence, the non–centrality parameter is set to zero.

The linear/additive predictors are
*
η = (μ, σ, log log ν)^T,*
where *log σ* and *ν* are intercept–only
by default.

An object of class `"vglmff"`

(see `vglmff-class`

)
to be used by VGLM/VGAM modelling functions, e.g.,
`vglm`

or `vgam`

.

If `order = 0`

, then `AR.studentt.ff`

fits a usual 3–parameter Student–*t*, as with
`studentt3`

.

If covariates are incorporated in the analysis,
these are embedded in the location–parameter model.
Modify this through `zero`

.
See `CommonVGAMffArguments`

for details on `zero`

.

Victor Miranda

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ```
### Estimate the parameters of the errors distribution for an
## AR(1) model. Sample size = 50
set.seed(20180218)
nn <- 250
y <- numeric(nn)
ncp <- 0 # Non--centrality parameter
nu <- 3.5 # Degrees of freedom.
theta <- 0.45 # AR coefficient
res <- numeric(250) # Vector of residuals.
y[1] <- rt(1, df = nu, ncp = ncp)
for (ii in 2:nn) {
res[ii] <- rt(1, df = nu, ncp = ncp)
y[ii] <- theta * y[ii - 1] + res[ii]
}
# Remove warm up values.
y <- y[-c(1:200)]
res <- res[-c(1:200)]
### Fitting an ARMA(1, 0) with Student-t errors.
AR.stut.er.fit <- vglm(y ~ 1, ARMA.studentt.ff(order = c(1, 0)),
data = data.frame(y = y), trace = TRUE)
summary(AR.stut.er.fit)
Coef(AR.stut.er.fit)
plot(ts(y), col = "red", lty = 1, ylim = c(-6, 6), main = "Plot of series Y with Student-t errors")
lines(ts(fitted.values(AR.stut.er.fit)), col = "blue", lty = 2)
abline( h = 0, lty = 2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.