rank_factors_est {TensorPreAve} | R Documentation |
Rank and Factor Loadings Estimation
Description
The complete procedure to estimate both rank and factor loading matrices simultaneously for a tensor time series.
Usage
rank_factors_est(
X,
proj_N = 30,
r_range = NULL,
C_range = NULL,
M0 = 200,
M = 5,
B = 50,
eigen_j = NULL,
input_r = NULL
)
Arguments
X |
A 'Tensor' object defined in package rTensor with |
proj_N |
Number of iterations for iterative projection. Default is 30. |
r_range |
Approximate range of |
C_range |
The range of constant C for calculating threshold. Default is |
M0 |
Number of random samples to generate in pre-averaging procedure. Default is 200. |
M |
Number of chosen samples for pre-averaging. Usually can be set as constants (5 or 10) or 2.5 percents of |
B |
Number of bootstrap samples for estimating rank of core tensor by bootstrapped correlation thresholding. Default is 50. Can be set as 10 when dimension is large. |
eigen_j |
The j-th eigenvalue to calculate eigenvalue-ratio for a randomly chosen sample, written as a vector of length |
input_r |
The rank of core tensor if it is already know, written as a vector of length |
Details
Input a tensor time series and return the estimated factor loading matrices and rank of core tensor.
Value
A list containing the following:
rank
: A vector of K
elements, indicating the estimated number of factors in each mode
loadings
: A list of K
estimated factor loading matrices.
Examples
# Example of real data set
set.seed(10)
results = rank_factors_est(value_weight_tensor)
results
# Example using generated data
K = 2
T = 100
d = c(40,40)
r = c(2,2)
re = c(2,2)
eta = list(c(0,0),c(0,0))
u = list(c(-2,2),c(-2,2))
set.seed(10)
Data_test = tensor_data_gen(K,T,d,r,re,eta,u)
X = Data_test$X
results = rank_factors_est(X)
results