convergence_t_tests: Computes convergence diagnistics

Description Usage Arguments Details Value

Description

Computes a very simple convergence diagnistic based on a t-test for equal means for different windows of the chain. For each window, each parameter is compared with the samples from the last half of the data and the t-test p-value is computed.

Usage

1
convergence_t_tests(samples, window_size = nrow(samples)/20)

Arguments

samples

Samples from a CoalHMM MCMC run.

window_size

Size of windows to use in the t-tests.

Details

Keep in mind that this function only compare means. It is not a complete diagnistic of convergence since samples from two windows can be very different and still have the same mean. Generally, though, the CoalHMM runs tends to have very different means if they are not converged.

Value

A data frame with p-values for the t-tests in each window.


mailund/coalhmm-analysis documentation built on May 21, 2019, 11:06 a.m.