Learn R Programming

qtlnet (version 1.5.4)

subset.qtlnet: Catenate or subset qtlnet object(s).

Description

Multiple qtlnet objects can be catenated together or subsetted by run.

Usage

# S3 method for qtlnet
subset(x, run, …)
# S3 method for qtlnet
c(…)
best.qtlnet(x, burnin = attr(x, "burnin"), wh = which.min(meanbic(x, burnin)))

Arguments

x

Object of class qtlnet. See mcmc.qtlnet.

run

Numeric index to desired run. Must be between 0 and number of runs.

burnin

Proportion of MCMC samples to be considered as burnin. Taken from qtlnet object usually.

wh

Number identifying which model is best.

For c.qtlnet, objects of class qtlnet to be joined. Ignored for subset.qtlnet.

Value

Both return an object of class qtlnet.

Details

The catenation is used by parallel.qtlnet in phase 5 to join together multiple independent MCMC runs. Note that the averaged network and the frequency of acceptance for a derived subset are only based on the saved samples, while the original qtlnet objects used all samples. Thus catenation and subset are not strictly reversible functions.

The best.qtlnet routine picks the run with the best (lowest) BIC score on average and returns that run as a qtlnet object. It also produces a trace plot of BIC for all the runs.

See Also

mcmc.qtlnet

Examples

Run this code
# NOT RUN {
joined <- c(qtlnet1, qtlnet2)
sub1 <- subset(joined, 1)
best <- best.qtlnet(joined)
## qtlnet1 and sub1 should be nearly identical.
# }

Run the code above in your browser using DataLab