| BTRR_GGM | R Documentation |
Performs the MCMC to draw from the posterior distribution for the model published by Spencer, Guhaniyogi, and Prado (2020).
BTRR_GGM(
input,
n_iter = 100,
n_burn = 0,
Rank = 1,
hyperparameters = NULL,
save_after = NULL,
save_llik = TRUE,
results_file = NULL,
num_cores = parallel::detectCores() - 2,
save_dir = "."
)
input |
an object of class |
n_iter |
(a scalar) the number of posterior samples desired |
n_burn |
(a scalar) the number of posterior samples to discard as a burn-in |
Rank |
(a positive integer) the rank for the PARAFAC/CP tensor decomposition |
hyperparameters |
a list with named numbers containing at least one of
the following: |
save_after |
(an integer) An .rds file will be saved every
|
save_llik |
(a logical) Should the log-likelihood be calculated and
saved at each iteration? Doing so comes at a cost, but can be used for
model diagnostics. Defaults to |
results_file |
(optional) The relative path to a result file. This is used to continue an MCMC chain on a set of data for which some results already exist. |
num_cores |
The number of cores used for running the code in parallel |
save_dir |
(a character) A path to a directory in which the temporary results will be saved. Defaults to the current working directory. |
A list object with the posterior draws from the MCMC chain.
## Not run:
input <- TRR_GGM_simulated_data()
results <- BTRR_GGM(input)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.