estimateTimeMCMC: Time estimate to complete a MCMC chain

View source: R/estimateTimeMCMC.R

estimateTimeMCMCR Documentation

Time estimate to complete a MCMC chain

Description

Estimate time minimum time needed to run the MCMC.

Usage

estimateTimeMCMC(data, phy, gen, eval.times = 5, singlerate = FALSE)

Arguments

data

a matrix with the data. Each column is a different trait and species names need to be provided as rownames (rownames(data) == phy$tip.label).

phy

a phylogeny of the class "simmap" with the mapped regimes for two or more R regimes OR a phylogeny of the class "phylo" for a single regime. The number of evolutionary rate matrices fitted to the phylogeny is equal to the number of regimes in 'phy'. Regime names will also be used.

gen

number of generations of the complete MCMC chain. This is used to create the time estimate for the analysis.

eval.times

number of replicates to compute the likelihood (default is 5). A time average across replicates will be used in order to account for the uncertainty associated with computing times.

singlerate

whether the function should fit a single regime and ignore the number of regimes painted to the tree (default is FALSE).

Details

Function will estimate the time based on the computation of the log-likelihood, prior density, and the Jacobian of the proposal step. The time estimated is a minimum bound based on the processing power of the current computer. Running the MCMC in different computers might change the time. Other factors, such as writing the posterior samples to large files, can influence the time to run the MCMC.

Value

Function returns a numeric value with the time estimate in hours and prints a message to the screen with the result.

Author(s)

Daniel S. Caetano and Luke J. Harmon


Caetanods/ratematrix documentation built on Jan. 4, 2023, 3:12 p.m.