ConvDiagnosis: Calculate Rhat statistic and generate traceplots for MCMC...

Description Usage Arguments Value Note

Description

Calculate Rhat statistic and generate traceplots for MCMC results

Usage

1
2
ConvDiagnosis(lsMCMC, start, end, thin, title, truth = NA, n.eig = 1,
  fast.eig = TRUE)

Arguments

lsMCMC

A list of MCMC simulation results. lsMCMC>=2 is required for the Rhat statistic calculation.

start

The iteration number of the first observation.

end

The iteration number of the last observation.

thin

The thinning interval between consecutive observations.

title

The title of each figure.

n.eig

Number of eigen values the diagnosis will consider. Default is 1.

fast.eig

Whether to use fast eigen decomposition algorithm. Default is TRUE and eig_sym from rARPACK package will be used.

If

provided, a list contains the simulation truth for the dataset. Must include two fields Y, the latent biological sample factors, and er, the variance of the pure error.

Value

A matrix contains the Rhat statistics. The first column is the point estimates and the second column is the upper confidence limits. n.eig traceplots will also be generated for the first n.eig eigenvalues.

Note

The diagnosis is carried out using the MCMC samples of the first n.eig eigenvalues of the normalized between-sample Gram matrix.


boyuren158/DirFactor documentation built on May 13, 2019, 1:38 a.m.