Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mcmc.subset

Extract or replace parts of MCMC objects


Description

These are methods for subsetting mcmc objects. You can select iterations using the first dimension and variables using the second dimension. Selecting iterations will return a vector or matrix, not an mcmc object. If you want to do row-subsetting of an mcmc object and preserve its dimensions, use the window function.

Subsetting applied to an mcmc.list object will simultaneously affect all the parallel chains in the object.

Usage

## S3 method for class 'mcmc'
x[i,j, drop=missing(i)]
## S3 method for class 'mcmc.list'
x[i,j, drop=TRUE]

Arguments

x

An mcmc object

i

Row to extract

j

Column to extract

drop

if TRUE, the redundant dimensions are dropped

See Also


coda

Output Analysis and Diagnostics for MCMC

v0.19-4
GPL (>= 2)
Authors
Martyn Plummer [aut, cre, trl], Nicky Best [aut], Kate Cowles [aut], Karen Vines [aut], Deepayan Sarkar [aut], Douglas Bates [aut], Russell Almond [aut], Arni Magnusson [aut]
Initial release
2020-09-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.