View source: R/intial_estimation.R
boot_init | R Documentation |
boot_init
implements the estimation scheme of the initial parameter
values given in Appendix B of Estimation of Impulse-Response
Functions with Dynamic Factor Models: A New Parametrization available at
https://arxiv.org/pdf/2202.00310.pdf.
boot_init(data, nu, degs = NULL, reg_prm = 6, nrep = 1, tmpl_mod = NULL)
data |
matrix of dimension |
nu |
a vector of Kronecker indices |
degs |
optional, vector of length 2, where one can specify the degrees of c(z) and d(z),
either of the parameters must be equal to |
reg_prm |
integer valued parameter allowing the user to directly estimate initial values from
regularized data such that the std deviation of the randomly drawn noise vector of normally
distributed values is |
nrep |
integer, |
tmpl_mod |
optional, supply the template as an input, using this speeds up the function,
enabled for convenience of the function |
a list of elements
params0 |
vector of initial values |
sigma |
estimate of initial error covariance matrix |
llval |
the log-likelihood value of the initial state space model, returned only if |
# compare the difference in computing time
# w/ and w/o bootstrapping
# scale data first
Y <- scale(FRED_light$df)
tmp <- Sys.time()
arg_list <- list(data = Y, nu = c(1,1,1,1), reg_prm = NULL, nrep = 1)
est0 <- do.call(boot_init, arg_list)
time_elapsed <- Sys.time() - tmp
arg_list$nrep <- 10
tmp <- Sys.time()
est1 <- do.call(boot_init, arg_list)
time_elapsed1 <- Sys.time() - tmp
# the computation slows down roughly at a rate 1 sec/1 bootstrap round, and is
# caused by the evaluation of the log-likelihood of the boostrapped models
print(time_elapsed1 - time_elapsed)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.