getInit: A function to generate sensible initial values for MCMC...

Description Usage Arguments Value Examples

View source: R/getInit.R

Description

getInits generates initial values for a complex CMR model. Essentially the global parameters (mean rates) are estimated optimizing the probability density function, assuming all random effects are 0. Then each random effect is estimated independently, assuming all other random effects are 0. This is not proper optimization, but work reasonably well for initial values.

Usage

1
getInit(cmrModel)

Arguments

cmrModel

A CMR model structure with 1 clade.

Value

The function returns relatively decent initial values for MCMC estimation.

Examples

1
2
3
mod1 <- make.BayesCMR(Obs)
x0 <- getInit(mod1)
fit <- MCMC_CMR(mod1,x0=x0)

josteist/Compadre documentation built on June 3, 2021, 1:02 p.m.