AR1EIM {VGAM} | R Documentation |
Computation of the Exact EIM of an Order-1 Autoregressive Process
Description
Computation of the exact Expected Information Matrix of
the Autoregressive process of order- (AR(
))
with Gaussian white noise and stationary
random components.
Usage
AR1EIM(x = NULL, var.arg = NULL, p.drift = NULL,
WNsd = NULL, ARcoeff1 = NULL, eps.porat = 1e-2)
Arguments
x |
A vector of quantiles. The gaussian time series for which the EIMs are computed. If multiple time series are being analyzed, then |
var.arg |
Logical. Same as with |
p.drift |
A numeric vector with the scaled mean(s) (commonly referred as drift) of the AR process(es) in turn. Its length matches the number of responses. |
WNsd , ARcoeff1 |
Matrices.
The standard deviation of the white noise, and the
correlation (coefficient) of the AR( That is, the dimension for each matrix is |
eps.porat |
A very small positive number to test whether the standar deviation
( See below for further details. |
Details
This function implements the algorithm of Porat and Friedlander (1986) to recursively compute the exact expected information matrix (EIM) of Gaussian time series with stationary random components.
By default, when the VGLM/VGAM family function
AR1
is used to fit an AR() model
via
vglm
, Fisher scoring is executed using
the approximate EIM for the AR process. However, this model
can also be fitted using the exact EIMs computed by
AR1EIM
.
Given consecutive data points,
with probability density
,
the Porat and Friedlander algorithm
calculates the EIMs
,
for all
. This is done based on the
Levinson-Durbin algorithm for computing the orthogonal polynomials of
a Toeplitz matrix.
In particular, for the AR(
) model, the vector of parameters
to be estimated under the VGAM/VGLM approach is
where is the variance of the white noise
and
is the drift parameter
(See
AR1
for further details on this).
Consequently, for each observation , the EIM,
, has dimension
, where the diagonal elements are:
and
As for the off-diagonal elements, one has the usual entries, i.e.,
etc.
If var.arg = FALSE
, then instead of
is estimated. Therefore,
,
, etc., are correspondingly replaced.
Once these expected values are internally computed, they are returned
in an array of dimension ,
of the form
AR1EIM
handles multiple time series, say .
If this happens, then it accordingly returns an array of
dimension
. Here,
, for
, is a matrix
of dimension
, which
stores the EIMs for the
th response, as
above, i.e.,
the bandwith form, as per required by
AR1
.
Value
An array of dimension ,
as above.
This array stores the EIMs calculated from the joint density as a function of
Nevertheless, note that, under the VGAM/VGLM approach, the EIMs
must be correspondingly calculated in terms of the linear
predictors, .
Asymptotic behaviour of the algorithm
For large enough , the EIMs,
,
become approximately linear in
. That is, for some
,
where is
a constant matrix.
This relationsihip is internally considered if a proper value
of is determined. Different ways can be adopted to
find
. In
AR1EIM
, this is done by checking
the difference between the internally estimated variances and the
entered ones at WNsd
.
If this difference is less than
eps.porat
at some iteration, say at iteration ,
then
AR1EIM
takes
as the last computed increment of
, and extraplotates
, for all
using
.
Else, the algorithm will complete the iterations for
.
Finally, note that the rate of convergence reasonably decreases if
the asymptotic relationship is used to compute
,
. Normally, the number
of operations involved on this algorithm is proportional to
.
See Porat and Friedlander (1986) for full details on the asymptotic behaviour of the algorithm.
Warning
Arguments WNsd
, and ARcoeff1
are matrices of dimension
. Else, these arguments are accordingly
recycled.
Note
For simplicity, one can assume that the time series analyzed has
a 0-mean. Consequently, where the family function
AR1
calls AR1EIM
to compute
the EIMs, the argument p.drift
is internally set
to zero-vector, whereas x
is centered by
subtracting its mean value.
Author(s)
V. Miranda and T. W. Yee.
References
Porat, B. and Friedlander, B. (1986). Computation of the Exact Information Matrix of Gaussian Time Series with Stationary Random Components. IEEE Transactions on Acoustics, Speech, and Signal Processing, 54(1), 118–130.
See Also
AR1
.
Examples
set.seed(1)
nn <- 500
ARcoeff1 <- c(0.3, 0.25) # Will be recycled.
WNsd <- c(exp(1), exp(1.5)) # Will be recycled.
p.drift <- c(0, 0) # Zero-mean gaussian time series.
### Generate two (zero-mean) AR(1) processes ###
ts1 <- p.drift[1]/(1 - ARcoeff1[1]) +
arima.sim(model = list(ar = ARcoeff1[1]), n = nn,
sd = WNsd[1])
ts2 <- p.drift[2]/(1 - ARcoeff1[2]) +
arima.sim(model = list(ar = ARcoeff1[2]), n = nn,
sd = WNsd[2])
ARdata <- matrix(cbind(ts1, ts2), ncol = 2)
### Compute the exact EIMs: TWO responses. ###
ExactEIM <- AR1EIM(x = ARdata, var.arg = FALSE, p.drift = p.drift,
WNsd = WNsd, ARcoeff1 = ARcoeff1)
### For response 1:
head(ExactEIM[, 1 ,]) # NOTICE THAT THIS IS A (nn x 6) MATRIX!
### For response 2:
head(ExactEIM[, 2 ,]) # NOTICE THAT THIS IS A (nn x 6) MATRIX!