| tomarparambyComp {mixAR} | R Documentation |
Translations of my old MixAR Mathematica functions
Description
Translations of some of my MixAR Mathematica functions. Not sure if these are still used.
Usage
tomarparambyComp(params)
tomarparambyType(params)
permuteArpar(params)
Arguments
params |
the parameters of the MixAR model, a list, see Details. |
Details
tomarparambyComp is for completeness, my Mathematica programs
do not have this currently.
The arrangement of the parameters of MixAR models in package
"MixAR" is “by type”: slot prob contains the mixture
probabilities (weights), shift contains intercepts, and so on.
An alternative representation is “by component”: a list whose k-th elements contains all parameters associated with the k-th mixture component. The functions described here use the following order for the parameter of the k-th component: prob_k, shift_k, arcoeff_k, sigma2_k.
tomarparambyType takes an argument, params, arranged
“by component” and converts it to “by type”.
tomarparambyComp does the inverse operation, from “by type”
to “by component”.
permuteArpar creates all permutaions of the components of a
MixAR model. It takes a “by component” argument. The autoregressive
orders are not permuted, in that if the input model has AR orders
c(2, 1, 3), all permuted models are also c(2, 1, 3).
The AR coefficients of shorter or longer components are padded with
zeroes or truncated, respectively, see the unexported
adjustLengths().
Value
For tomarparambyComp, a list containing the parameters of
the model arranged “by component”, see Details.
For tomarparambyType, a list containing the parameters of
the model arranged “by type”. It contains the following elements.
prob |
mixture probabilities, a numeric vector, |
shift |
shifts, a numeric vector, |
arcoef |
autoregressive coefficients, |
s2 |
noise variances, a numeric vector. |
For permuteArpar, a list with one element (arranged “by
type”) for each possible permutation of the AR parameters.
Author(s)
Georgi N. Boshnakov
See Also
Examples
bycomp <- list(list(0.1, 10, 0.11, 1),
list(0.2, 20, c(0.11, 0.22), 2),
list(0.3, 30, c(0.11, 0.22, 0.33), 3) )
bytype <- tomarparambyType(bycomp)
identical(bycomp, tomarparambyComp(bytype)) # TRUE
permuteArpar(bycomp)