A function that estimates the set of relevant lags of an MTD model using the FS method.
hdMTD_FS(X, d, l, A = NULL, elbowTest = FALSE, warning = FALSE, ...)
A numeric vector containing the estimated relevant lag set using FS algorithm.
A vector or single-column data frame containing a chain sample (X[1]
is the most recent).
A positive integer representing an upper bound for the chain order.
A positive integer specifying the number of lags to be selected as relevant.
A vector with positive integers representing the state space. If not informed,
this function will set A <- sort(unique(X))
.
Logical. If TRUE, the function applies an alternative stopping criterion to determine the length of the set of relevant lags. See Details for more information.
Logical. If TRUE
, the function warns the user when A
is set automatically.
Additional arguments (not used in this function, but maintained for compatibility with hdMTD()
.
The "Forward Stepwise" (FS) algorithm is the first step of the "Forward Stepwise and Cut"
(FSC) algorithm for inference in Mixture Transition Distribution (MTD) models.
This method was developed by Ost and Takahashi
This specific function will only apply the FS step of the algorithm and return an estimated
relevant lag set of length l
.
This method iteratively selects the most relevant lags based on a certain quantity \(\nu\).
In the first step, the lag in 1:d
with the greatest \(\nu\) is deemed important.
This lag is included in the output, and using this knowledge, the function proceeds to seek
the next important lag (the one with the highest \(\nu\) among the remaining ones).
The process stops when the output vector reaches length l
if elbowTest=FALSE
.
If elbowTest = TRUE
, the function will store these maximum \(\nu\) values
at each iteration, and output only the lags that appear before the one with smallest
\(\nu\) among them.
Ost, G. & Takahashi, D. Y. (2023). Sparse Markov models for high-dimensional inference. Journal of Machine Learning Research, 24(279), 1-54. http://jmlr.org/papers/v24/22-0266.html
X <- testChains[,1]
hdMTD_FS(X,d=5,l=2)
hdMTD_FS(X,d=4,l=3,elbowTest = TRUE)
Run the code above in your browser using DataLab