get_discrete_output.Rd
This function runs multiple Markov Chains in parallel or sequentially to generate output from a Parallel Tempering Monte Carlo (PTMC) model. The output includes the posterior parameter samples, discrete state information, log posterior values, temperatures, and acceptance rates.
get_discrete_output(model, data_list, settings, update_ind, par)
A list representing the model containing information such as parameter names and any model-specific settings required for running the PTMC.
A list containing the data necessary for running the model. This could include observed data, priors, and any other variables needed for the simulation.
A list containing the settings for the model execution. The list must contain:
- numberChainRuns
: The number of chains to run in parallel.
- runParallel
: A boolean indicating whether to run the chains in parallel (TRUE)
or sequentially (FALSE).
- numberFittedPar
: The number of parameters to fit in the model.
An index or flag used to control which part of the model or data to update during the PTMC simulation.
A list of parameters or starting values for the chains. Each element corresponds to one chain.
A list containing the results of the PTMC simulation. The list includes:
An MCMC object containing the posterior samples of the model parameters.
A list of discrete states generated during the simulation for each chain.
A data frame of log-posterior values, with columns representing different chains and rows representing samples.
A data frame of temperatures for each chain at each sample.
A data frame of acceptance rates for each chain at each sample.
A list containing the parameter values for each chain.