| extract_factors | R Documentation |
Given an estimated pvarife_result and an arbitrary coefficient vector
beta, runs the inner EM loop to extract common factors and factor
loadings. Useful for advanced users (e.g., bootstrap procedures that need
factor estimates at a perturbed beta).
extract_factors(beta, fit, n_in = 10L)
beta |
Numeric vector of VAR coefficients (same length as
|
fit |
An object of class |
n_in |
Number of inner iterations (default 10). |
Faithful translation of Inner_Iteration.m from Tugan (2021).
A list with ff (T x r factor matrix) and loadings
(Kr x I loading matrix).
sim <- sim_pvarife(n_units = 20, n_time = 15, n_vars = 2,
n_lags = 1, n_factors = 1, seed = 2)
fit <- pvarife(sim$y, n_lags = 1, n_factors = 1, n_out = 5, n_in = 3)
ef <- extract_factors(fit$beta * 0.9, fit)
dim(ef$ff) # T x r
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.