iter_proj {TensorPreAve} | R Documentation |
Iterative Projection Estimator.
Description
Function for Iterative Projection Direction Refinement to re-estimate the factor loading matrices.
Usage
iter_proj(X, initial_direction, proj_N = 30, z = rep(1, X@num_modes - 1))
Arguments
X |
A 'Tensor' object defined in package rTensor with |
initial_direction |
Initial direction for projection, written in a list of |
proj_N |
Number of iterations, should be a positive integer. Default is 30. |
z |
(Estimated) Rank of the core tensor, written as a vector of length |
Details
Input a tensor time series and initial estimated directions corresponding to the strongest factors, return the estimated factor loading matrices (or directions) using the Algorithm for Iterative Projection Direction Refinement.
Value
A list of K
estimated factor loading matrices.
Examples
# Example of a real data set
set.seed(10)
Q_PRE = pre_est(value_weight_tensor)
Q_PROJ = iter_proj(value_weight_tensor, initial_direction = Q_PRE)
Q_PROJ
set.seed(10)
Q_PRE = pre_est(value_weight_tensor)
Q_PROJ_2 = iter_proj(value_weight_tensor, initial_direction = Q_PRE, z = c(2,2))
Q_PROJ_2
# 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
Q_PRE = pre_est(X)
Q_PROJ = iter_proj(X, initial_direction = Q_PRE, z = r)
Q_PROJ