.canonic_coef | R Documentation |
Put core MixAR coefficients into a canonical form, internal function.
.canonic_coef(coef, filler)
coef |
the core coefficients of a MixAR model, a list. |
filler |
a value for filling unspecified entries, such as
|
This is an internal function called by mixAR
to put MixAR
parameters into a canonical form. "shift"
, "scale"
and
"prob"
are normally vectors with one element for each
component but they may also be given as a single number, in which case
it is taken to be the common value for all parameters and
.canonic_coef
extends them correspondingly. Also, the AR
coefficients may be specified in a number of ways and this function
converts them to the format used by the MixAR classes.
a list with the folowing components:
order |
MixAR order, a vector of integers |
prob |
MixAR probabilities, vector of length |
shift |
MixAR shift parameters, vector of length |
scale |
MixAR scle parameters, vector of length |
arcoef |
AR coefficients as a |
Georgi N. Boshnakov
mixAR
## missing components are filled with 'filler', extended accordingly
mixAR:::.canonic_coef(list(order = c(2,3)), filler = NA)
# here 'scale' is replicated, the missing 'shift' is inserted
mo <- list(order = c(2,3), prob = c(0.4, 0.6), scale = 1,
arcoef = list(c(0.5, -0.5), c(1.1, 0.0, -0.5)) )
mixAR:::.canonic_coef(mo, filler = NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.