Type: | Package |
Title: | Estimating the Sufficient Dimension Reduction Subspaces in Time Series |
Version: | 1.0.0 |
Maintainer: | Tharindu P. De Alwis <talwis@wpi.edu> |
Depends: | R(≥ 3.5.0), stats |
Imports: | psych, tseries, pracma |
Description: | The sdrt() function is designed for estimating subspaces for Sufficient Dimension Reduction (SDR) in time series, with a specific focus on the Time Series Central Mean subspace (TS-CMS). The package employs the Fourier transformation method proposed by Samadi and De Alwis (2023) <doi:10.48550/arXiv.2312.02110> and the Nadaraya-Watson kernel smoother method proposed by Park et al. (2009) <doi:10.1198/jcgs.2009.08076> for estimating the TS-CMS. The package provides tools for estimating distances between subspaces and includes functions for selecting model parameters using the Fourier transformation method. |
License: | GPL-2 | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.2.3 |
Suggests: | rmarkdown, knitr |
VignetteBuilder: | knitr |
NeedsCompilation: | yes |
Packaged: | 2024-03-27 16:56:57 UTC; talwis |
Author: | Tharindu P. De Alwis
|
Repository: | CRAN |
Date/Publication: | 2024-03-28 16:30:02 UTC |
Return the distance between two subspaces spanning by column space of matrices.
Description
The function calculates three metrics for measuring the distance between two subspaces spaning by the columns of two matrices.
Usage
dist(A, B)
Arguments
A |
Matrix 1 with dimension p-by-d. |
B |
Matrix 2 with dimension p-by-d. |
Value
The outputs include three scales and one d-dimensional vector.
r |
One minuse the summation of eiegenvalues of the matrix B^TAA^TB. |
q |
One minues the product of eiegenvalues of the matrix B^TAA^TB. |
rho |
rho=sqrt(A^TBB^TA) |
m^2 |
A d-variate vector giving the colum-wise distance between A and B. |
References
Samadi S. Y. and De Alwis T. P. (2023). Fourier Method of Estimating Time Series Central Mean Subspace. https://arxiv.org/pdf/2312.02110.
Ye Z. and Weiss R.E. (2003). Using the Bootstrap to Select One of a New Class of Dimension Reduction Methods, Journal of the American Statistical Association, 98,968-978.
Canadian Lynx Data.
Description
Annual record of the number of the Canadian Lynx ‘trapped’ in the Mackenzie River district of the North-West Canada for the period 1821-1934.
Usage
data(lynx)
Format
A data list with 114 rows containing the count of Canadian Lynx from 1821-1934.
Source
https://www.encyclopediaofmath.org /index.php/Canadian_lynx_data
Select the model parameters using Fourier transformation method.
Description
‘pd.boots()’ estimates the number of lags in the model and the dimension of the time series central mean subspace.
Usage
pd.boots(y, p_list=seq(2,6,by=1), w1=0.1, space = "mean",std = FALSE,
density = "kernel", method = "FM", B=50)
Arguments
y |
A univariate time series observations. |
p_list |
(default {2,3,4,5,6}). The candidate list of the number of lags, p. |
w1 |
(default 0.1). The tuning parameter of the estimation. |
space |
(default “mean”). Specify the SDR subspace needed to be estimated. |
std |
(default FALSE). If TRUE, then standardizing the time series observations. |
density |
(default “kernel”). Density function for the estimation (“kernel” or “normal”). |
method |
(default “FM”). Estimation method (“FM” or “NW”). |
B |
(default 50). Number of block bootstrap sample. |
Value
The output is a p-by-p matrix, estimated p and d.
dis_dp |
The average block bootsrap distances. |
p_hat |
The estimator for p. |
d_hat |
The estimator for d. |
References
Samadi S. Y. and De Alwis T. P. (2023). Fourier Method of Estimating Time Series Central Mean Subspace. https://arxiv.org/pdf/2312.02110.
Examples
data("lynx")
y <- log10(lynx)
p_list=seq(2,5,by=1)
fit.model=pd.boots(y,p_list,w1=0.1,B=10)
fit.model$dis_pd
fit.model$p_hat
fit.model$d_hat
Estimate the SDR subspaces for univariate time series data.
Description
‘sdrt()’ is the main function to estimate the SDR subspaces in time series.
Usage
sdrt(y, p, d, w1 = 0.1, space = "mean", std = FALSE,
density = "normal", method = "FM",n.grid=10)
Arguments
y |
A univariate time series observations. |
p |
Integer value. The lag of the time series. |
d |
Integer value (<p). The dimension of the time series central mean subspace. |
w1 |
(default 0.1). The tuning parameter of the “FM” estimation method. |
space |
(default “mean”). Specify the SDR subspace needed to be estimated. |
std |
(default FALSE). If TRUE, then standardize the data. |
density |
(default “kernel”). Specify the density function for the estimation (“kernel” or “normal”). |
method |
(default “FM”). Specify the estimation method (“FM” or “NW”). |
n.grid |
(default 10). Number of searches for the initial value in “NW” method |
Value
The output is a p-by-d basis matrix for the TS-CMS.
References
Park J. H., Sriram T. N. and Yin X. (2010). Dimension Reduction in Time Series. Statistica Sinica. 20, 747-770.
Samadi S. Y. and De Alwis T. P. (2023). Fourier Method of Estimating Time Series Central Mean Subspace. https://arxiv.org/pdf/2312.02110.
See Also
Examples
data("lynx")
y <- log10(lynx)
p <- 3
d <- 1
fit.model <- sdrt(y, p, d=1,method="FM",density = "kernel")
fit.model$eta_hat
The tuning parameter for the estimation of the time series central mean subspace
Description
‘sigma_u()’ estimates the turning parameter needed to estimate time series central mean subspace in Fourier Method.
Usage
sigma_u(y, p, d, w1_list=seq(0.1,0.5,by=0.1),space="mean",
std=FALSE,density="kernel",method="FM",B=20)
Arguments
y |
A univariate time series observations. |
p |
Integer value. The lag of the time series. |
d |
Integer value. The dimension of the time series central mean subspace. |
w1_list |
(default {0.1, 0.2,0.3,0.4,0.5}). The sequence of candidate list for the tuning parameter. |
space |
(default “mean”). Specify the SDR subspace needed to be estimated. |
std |
(default FALSE). If TRUE, then standardizing the time series observations. |
density |
(default “kernel”). Specify the density function for the estimation (“kernel” or “normal”). |
method |
(default “FM”). Specify the estimation method. (“FM” or “NW”). |
B |
(default 20). Number of block bootstrap samples. |
Value
The output is a length(sw2_seq) dimensional vector.
dis_sw2 |
The average block boostrap distances for each candidate list of values. |
References
Samadi S. Y. and De Alwis T. P. (2023). Fourier Method of Estimating Time Series Central Mean Subspace. https://arxiv.org/pdf/2312.02110.
Examples
data("lynx")
y <- log10(lynx)
p <- 3
d <- 1
w1_list=seq(0.1,0.5,by=0.1)
Tuning.model=sigma_u(y, p, d, w1_list=w1_list, std=FALSE, B=10)
Tuning.model$sigma_u_hat