get_pars | R Documentation |
Underlying function used in most plotting and object handling functions in
EMC2. Can for example be used to filter/thin a parameter type
(i.e, group-level means mu
) and convert to an mcmc.list.
get_pars(
emc,
selection = "mu",
stage = get_last_stage(emc),
thin = 1,
filter = 0,
map = FALSE,
add_recalculated = FALSE,
length.out = NULL,
by_subject = FALSE,
return_mcmc = TRUE,
merge_chains = FALSE,
subject = NULL,
flatten = FALSE,
remove_dup = FALSE,
remove_constants = TRUE,
use_par = NULL,
type = NULL,
true_pars = NULL,
chain = NULL,
covariates = NULL
)
emc |
an emc object. |
selection |
A Character string. Indicates which parameter type to select (e.g., |
stage |
A character string. Indicates from which sampling stage(s) to take the samples from (i.e. |
thin |
An integer. By how much to thin the chains |
filter |
Integer or numeric vector. If an integer is supplied, iterations up until that integer are removed. If a vector is supplied, the iterations within the range are kept. |
map |
Boolean. If |
add_recalculated |
Boolean. If |
length.out |
Integer. Alternatively to thinning, you can also select a desired length of the MCMC chains, which will be thinned appropriately. |
by_subject |
Boolean. If |
return_mcmc |
Boolean. If |
merge_chains |
Boolean. If |
subject |
Integer (vector) or character (vector). If an integer will select the 'x'th subject(s), if a character it should match subject names in the data which will be selected. |
flatten |
Boolean. If |
remove_dup |
Boolean. If |
remove_constants |
Boolean. If |
use_par |
Character (vector). If specified, only these parameters are returned. Should match the parameter names
(i.e. these are collapsed when |
type |
Character indicating the group-level model selected. Only necessary if sampler isn't specified. |
true_pars |
Set of |
chain |
Integer. Which of the chain(s) to return |
covariates |
Only needed with |
An mcmc.list object of the selected parameter types with the specified manipulations
# E.g. get the group-level mean parameters mapped back to the design
get_pars(samples_LNR, stage = "sample", map = TRUE, selection = "mu")
# Or return the flattened correlation, with 10 iterations per chain
get_pars(samples_LNR, stage = "sample", selection = "correlation", flatten = TRUE, length.out = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.