read.cosmosis.mcmc: Create a data frame from CosmoSIS MCMC sampler output.

View source: R/data_input.R

read.cosmosis.mcmcR Documentation

Create a data frame from CosmoSIS MCMC sampler output.

Description

Reads a file in CosmoSIS MCMC sampler output format and creates a data frame from it. Each line in the file corresponds to a sample in the data frame; each column in the file corresponds to a column in the data frame.

Usage

read.cosmosis.mcmc(fname, burn = 0L, drop.nonsampling = TRUE)

Arguments

fname

The name of the CosmoSIS MCMC sampler output file to be read. making the data frame

burn

The length of the burn-in period; these samples are ignored in making the data frame.

drop.nonsampling

(default TRUE) if TRUE, non-sampling columns are dropped

Details

The columns in a CosmoSIS MCMC data frame are:

loglike

log-likelihood of the sample.

like

normalized likelihood of the sample.

others

one column per sampled variable in the MCMC output, named as in the output.

We expect the first line of the output to contain the names of the parameters, separated by spaces, and with section names separated from parameter names by a double-hyphen.

Value

a CosmoSIS MCMC data frame


marcpaterno/rcosmosis documentation built on June 5, 2023, 6:43 p.m.