View source: R/CP_functions_unified.R
CP_MTS | R Documentation |
CP_MTS()
deals with the estimation of the CP-factor model for matrix time series:
{\bf{Y}}_t = {\bf A \bf X}_t{\bf B}' +
{\boldsymbol{\epsilon}}_t,
where {\bf X}_t = {\rm diag}(x_{t,1},\ldots,x_{t,d})
is a d \times d
unobservable diagonal matrix, {\boldsymbol{\epsilon}}_t
is a p \times q
matrix white noise, {\bf A}
and {\bf B}
are, respectively, p
\times d
and q \times d
unknown constant matrices with their columns being
unit vectors, and 1\leq d < \min(p,q)
is an unknown integer.
Let {\rm rank}(\mathbf{A}) = d_1
and {\rm rank}(\mathbf{B}) = d_2
with some unknown d_1,d_2\leq d
.
This function aims to estimate d, d_1, d_2
and the loading
matrices {\bf A}
and {\bf B}
using the methods proposed in Chang
et al. (2023) and Chang et al. (2024).
CP_MTS(
Y,
xi = NULL,
Rank = NULL,
lag.k = 20,
lag.ktilde = 10,
method = c("CP.Direct", "CP.Refined", "CP.Unified"),
thresh1 = FALSE,
thresh2 = FALSE,
thresh3 = FALSE,
delta1 = 2 * sqrt(log(dim(Y)[2] * dim(Y)[3])/dim(Y)[1]),
delta2 = delta1,
delta3 = delta1
)
Y |
An |
xi |
An |
Rank |
A list containing the following components: |
lag.k |
The time lag
where |
lag.ktilde |
The time lag |
method |
A string indicating which CP-decomposition method is used. Available options include:
|
thresh1 |
Logical. If |
thresh2 |
Logical. If |
thresh3 |
Logical. If |
delta1 |
The value of the threshold level |
delta2 |
The value of the threshold level |
delta3 |
The value of the threshold level |
All three CP-decomposition methods involve the estimation of the autocovariance of
{\bf Y}_t
and \xi_t
at lag k
, which is defined as follows:
\hat{\bf \Sigma}_{k} = T_{\delta_1}\{\hat{\boldsymbol{\Sigma}}_{\mathbf{Y},
\xi}(k)\}\ \ {\rm with}\ \ \hat{\boldsymbol{\Sigma}}_{\mathbf{Y}, \xi}(k) = \frac{1}{n-k}
\sum_{t=k+1}^n(\mathbf{Y}_t-\bar{\mathbf{Y}})(\xi_{t-k}-\bar{\xi})\,,
where \bar{\bf Y} = n^{-1}\sum_{t=1}^n {\bf Y}_t
, \bar{\xi}=n^{-1}\sum_{t=1}^n \xi_t
and T_{\delta_1}(\cdot)
is a threshold operator defined as
T_{\delta_1}({\bf W}) = \{w_{i,j}1(|w_{i,j}|\geq \delta_1)\}
for any matrix
{\bf W}=(w_{i,j})
, with the threshold level \delta_1 \geq 0
and 1(\cdot)
representing the indicator function. Chang et al. (2023) and Chang et al. (2024) suggest to choose
\delta_1 = 0
when p, q
are fixed and \delta_1>0
when pq \gg n
.
The refined estimation method involves
\check{\bf \Sigma}_{k} =
T_{\delta_2}\{\hat{\mathbf{\Sigma}}_{\check{\mathbf{Y}}}(k)\}\ \ {\rm with}
\ \ \hat{\mathbf{\Sigma}}_{\check{\mathbf{Y}}}(k)=\frac{1}{n-k}
\sum_{t=k+1}^n(\mathbf{Y}_t-\bar{\mathbf{Y}}) \otimes {\rm vec}
(\mathbf{Y}_{t-k}-\bar{\mathbf{Y}})\,,
where T_{\delta_2}(\cdot)
is a threshold operator with the threshold level
\delta_2 \geq 0
, and {\rm vec}(\cdot)
is a vecterization operator
with {\rm vec}({\bf H})
being the (m_1m_2)\times 1
vector obtained by stacking
the columns of the m_1 \times m_2
matrix {\bf H}
. See Section 3.2.2 of Chang
et al. (2023) for details.
The unified estimation method involves
\vec{\bf \Sigma}_{k}=
T_{\delta_3}\{\hat{\boldsymbol{\Sigma}}_{\vec{\mathbf{Y}}}(k)\}
\ \ {\rm with}\ \ \hat{\boldsymbol{\Sigma}}_{\vec{\mathbf{Y}}}(k)=\frac{1}{n-k}
\sum_{t=k+1}^n{\rm vec}({\mathbf{Y}}_t-\bar{\mathbf{Y}})\{{\rm vec}
(\mathbf{Y}_{t-k}-\bar{\mathbf{Y}})\}'\,,
where T_{\delta_3}(\cdot)
is a threshold operator with the threshold level
\delta_3 \geq 0
. See Section 4.2 of Chang et al. (2024) for details.
An object of class "mtscp"
, which contains the following
components:
A |
The estimated |
B |
The estimated |
f |
The estimated latent process |
Rank |
The estimated |
method |
A string indicating which CP-decomposition method is used. |
Chang, J., Du, Y., Huang, G., & Yao, Q. (2024). Identification and estimation for matrix time series CP-factor models. arXiv preprint. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.48550/arXiv.2410.05634")}.
Chang, J., He, J., Yang, L., & Yao, Q. (2023). Modelling matrix time series via a tensor CP-decomposition. Journal of the Royal Statistical Society Series B: Statistical Methodology, 85, 127–148. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.1093/jrsssb/qkac011")}.
# Example 1.
p <- 10
q <- 10
n <- 400
d = d1 = d2 <- 3
## DGP.CP() generates simulated data for the example in Chang et al. (2024).
data <- DGP.CP(n, p, q, d, d1, d2)
Y <- data$Y
## d is unknown
res1 <- CP_MTS(Y, method = "CP.Direct")
res2 <- CP_MTS(Y, method = "CP.Refined")
res3 <- CP_MTS(Y, method = "CP.Unified")
## d is known
res4 <- CP_MTS(Y, Rank = list(d = 3), method = "CP.Direct")
res5 <- CP_MTS(Y, Rank = list(d = 3), method = "CP.Refined")
# Example 2.
p <- 10
q <- 10
n <- 400
d1 = d2 <- 2
d <-3
data <- DGP.CP(n, p, q, d, d1, d2)
Y1 <- data$Y
## d, d1 and d2 are unknown
res6 <- CP_MTS(Y1, method = "CP.Unified")
## d, d1 and d2 are known
res7 <- CP_MTS(Y1, Rank = list(d = 3, d1 = 2, d2 = 2), method = "CP.Unified")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.