hdMTD_BIC {hdMTD} | R Documentation |
The Bayesian Information Criterion (BIC) method for inference in MTD models
Description
A function for estimating the relevant lag set \Lambda
of a Markov chain using
Bayesian Information Criterion (BIC). This means that this method selects the set of lags
that minimizes a penalized log likelihood for a given sample, see References below for
details on the method.
Usage
hdMTD_BIC(
X,
d,
S = seq_len(d),
minl = 1,
maxl = length(S),
xi = 1/2,
A = NULL,
byl = FALSE,
BICvalue = FALSE,
single_matrix = FALSE,
indep_part = TRUE,
zeta = maxl,
warning = FALSE,
...
)
Arguments
X |
A vector or single-column data frame containing a chain sample ( |
d |
A positive integer representing an upper bound for the chain order. |
S |
A numeric vector of positive integers from which this function will select
a set of relevant lags. Typically, |
minl |
A positive integer. |
maxl |
A positive integer equal to or greater than |
xi |
The BIC penalization term constant. Defaulted to 1/2. A smaller |
A |
A vector with positive integers representing the state space. If not informed,
this function will set |
byl |
Logical. If |
BICvalue |
Logical. If |
single_matrix |
Logical. If |
indep_part |
Logical. If |
zeta |
A positive integer representing the number of distinct matrices |
warning |
Logical. If |
... |
Additional arguments (not used in this function, but maintained for compatibility with |
Details
Note that the upper bound for the order of the chain (d
) affects the estimation
of the transition probabilities. If we run the function with a certain order parameter d
,
only the sequences of length d
that appeared in the sample will be counted. Therefore,
all transition probabilities, and hence all BIC values, will be calculated with respect to
that d
. If we use another value for d
to run the function, even if the output
agrees with that of the previous run, its BIC value might change a little.
The parameter zeta
indicates the the number of distinct matrices pj in the MTD.
If zeta = 1
, all matrices p_j
are identical; if zeta = 2
there exists
two groups of distinct matrices and so on. The largest value for zeta
is maxl
since this is the largest number of matrices p_j
. When minl<maxl
,
for each minl
\leq
l
\leq
maxl
, zeta = min(zeta,l)
.
If single_matrix = TRUE
then zeta
is set to 1.
Value
Returns a vector with the estimated relevant lag set using BIC. It might return more
than one set if minl < maxl
and byl = TRUE
. Additionally, it can return the value
of the penalized likelihood for the outputted lag sets if BICvalue = TRUE
.
References
Imre Csiszár, Paul C. Shields. The consistency of the BIC Markov order estimator. The Annals of Statistics, 28(6), 1601-1619. doi:10.1214/aos/1015957472
Examples
X <- testChains[, 1]
hdMTD_BIC (X, d = 6, minl = 1, maxl = 1)
hdMTD_BIC (X,d = 3,minl = 1, maxl = 2, BICvalue = TRUE)