Converts an MCMC object to an mcmcr-object().

as.mcmcr(x, ...)

# S3 method for class 'mcarray'
as.mcmcr(x, name = "par", ...)

# S3 method for class 'mcmcarray'
as.mcmcr(x, name = "par", ...)

# S3 method for class 'nlist'
as.mcmcr(x, ...)

# S3 method for class 'nlists'
as.mcmcr(x, ...)

# S3 method for class 'mcmc'
as.mcmcr(x, ...)

# S3 method for class 'mcmc.list'
as.mcmcr(x, ...)

# S3 method for class 'mcmcrs'
as.mcmcr(x, ...)

Arguments

x

An MCMC object.

...

Unused.

name

A string specifying the parameter name.

Value

An mcmcr object.

Methods (by class)

See also

Other coerce: as.mcarray(), as.mcmcarray(), mcmcrs()

Examples

mcmc.list <- coda::as.mcmc.list(mcmcr::mcmcr_example)
as.mcmcr(mcmc.list)
#> $alpha
#> [1] 3.718025 4.718025
#> 
#> nchains:  2 
#> niters:  400 
#> 
#> $beta
#>           [,1]     [,2]
#> [1,] 0.9716535 1.971654
#> [2,] 1.9716535 2.971654
#> 
#> nchains:  2 
#> niters:  400 
#> 
#> $sigma
#> [1] 0.7911975
#> 
#> nchains:  2 
#> niters:  400 
#>