stmarpars_to_gstmar {uGMAR} | R Documentation |
Transform a StMAR or G-StMAR model parameter vector to a corresponding G-StMAR model parameter vector with large dfs parameters reduced.
Description
stmarpars_to_gstmar
transforms a StMAR model parameter vector to a corresponding
G-StMAR model parameter vector with large dfs parameters reduced by switching the related regimes
to be GMAR type.
Usage
stmarpars_to_gstmar(
p,
M,
params,
model = c("GMAR", "StMAR", "G-StMAR"),
restricted = FALSE,
constraints = NULL,
maxdf = 100
)
Arguments
p |
a positive integer specifying the autoregressive order of the model. |
M |
|
params |
a real valued parameter vector specifying the model.
Symbol |
model |
is "GMAR", "StMAR", or "G-StMAR" model considered? In the G-StMAR model, the first |
restricted |
a logical argument stating whether the AR coefficients |
constraints |
specifies linear constraints imposed to each regime's autoregressive parameters separately.
The symbol |
maxdf |
regimes with degrees of freedom parameter value larger than this will be turned into GMAR type. |
Value
Returns a list with three elements: $params
contains the corresponding G-StMAR model
parameter vector, $reg_order
contains the permutation that was applied to the regimes
(GMAR type components first, and decreasing ordering by mixing weight parameters), and
$M
a vector of length two containing the number of GMAR type regimes in the first element
and the number of StMAR type regimes in the second.
Examples
params12 <- c(2, 0.9, 0.1, 0.8, 0.5, 0.5, 0.4, 12, 300)
stmarpars_to_gstmar(p=1, M=2, params=params12, model="StMAR", maxdf=100)