ccTrace: Read trace files from BGmix

Description Usage Arguments Value Author(s) Examples

Description

Reads output files containing whole posterior distributions from BGmix. Also calls 'ccSummary', and outputs model options.

Usage

1
ccTrace(filedir, q.beta = T, q.sig = T, q.z = T, quiet = T)

Arguments

filedir

character. The name of the output directory created by BGmix.

q.beta

logical. Read beta values?

q.sig

logical. Read gene variances?

q.z

logical. Read z values?

quiet

logical. Parameter passed to 'scan'. (If false, 'scan' prints details of number of items read in.)

Value

summ

list object output by 'ccSummary'

eta

matrix (no. components -1) x no. MCMC samples. Posterior of mixture component parameters (eta).

lambda

matrix (no. components -1) x no. MCMC samples. Posterior of mixture component parameters (lambda).

aa

matrix no. MCMC samples x no. variances. Posterior of variance hyperparameters (a).

bb

matrix no. MCMC samples x no. variances. Posterior of variance hyperparameters (b).

wtc

matrix no. MCMC samples x no. mixture components. Posterior of mixture weights.

beta

matrix no. effects x no. genes x no. MCMC samples. Posterior of gene effects.

sig2

matrix no. variances x no. genes x no. MCMC samples. Posterior of gene variances.

zg

matrix no. MCMC samples x no. genes. Posterior of gene allocations.

Author(s)

Alex Lewin

Examples

1
2
3
4
5
## Note this is a very short MCMC run!
## For good analysis need proper burn-in period.
data(ybar,ss)
outdir <- BGmix(ybar, ss, c(8,8), nburn=0, niter=100, nthin=1)
tr <- ccTrace(outdir)

BGmix documentation built on Nov. 8, 2020, 4:54 p.m.