forked from paul-buerkner/brms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharma.Rd
54 lines (49 loc) · 1.83 KB
/
arma.Rd
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formula-ac.R
\name{arma}
\alias{arma}
\title{Set up ARMA(p,q) correlation structures}
\usage{
arma(time = NA, gr = NA, p = 1, q = 1, cov = FALSE)
}
\arguments{
\item{time}{An optional time variable specifying the time ordering
of the observations. By default, the existing order of the observations
in the data is used.}
\item{gr}{An optional grouping variable. If specified, the correlation
structure is assumed to apply only to observations within the same grouping
level.}
\item{p}{A non-negative integer specifying the autoregressive (AR)
order of the ARMA structure. Default is \code{1}.}
\item{q}{A non-negative integer specifying the moving average (MA)
order of the ARMA structure. Default is \code{1}.}
\item{cov}{A flag indicating whether ARMA effects should be estimated by
means of residual covariance matrices. This is currently only possible for
stationary ARMA effects of order 1. If the model family does not have
natural residuals, latent residuals are added automatically. If
\code{FALSE} (the default), a regression formulation is used that is
considerably faster and allows for ARMA effects of order higher than 1 but
is only available for \code{gaussian} models and some of its
generalizations.}
}
\value{
An object of class \code{'arma_term'}, which is a list
of arguments to be interpreted by the formula
parsing functions of \pkg{brms}.
}
\description{
Set up an autoregressive moving average (ARMA) term of order (p, q) in
\pkg{brms}. The function does not evaluate its arguments -- it exists purely
to help set up a model with ARMA terms.
}
\examples{
\dontrun{
data("LakeHuron")
LakeHuron <- as.data.frame(LakeHuron)
fit <- brm(x ~ arma(p = 2, q = 1), data = LakeHuron)
summary(fit)
}
}
\seealso{
\code{\link{autocor-terms}}, \code{\link{ar}}, \code{\link{ma}},
}