View source: R/400_BTRR_single_subject.R
| BTRR_single_subject | R Documentation |
Performs the MCMC to draw from the posterior distribution for the model published by Guhaniyogi and Spencer (2020).
BTRR_single_subject(
input,
n_iter = 100,
n_burn = 0,
rank = 1,
hyperparameters = NULL,
save_after = NULL,
save_llik = TRUE,
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 |
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 with the posterior samples
## Not run:
input <- TRR_simulated_data()
results <- BTRR_single_subject(input)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.