File: mcmc.convert.Rd

package info (click to toggle)
r-cran-coda 0.9-1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 388 kB
  • ctags: 13
  • sloc: makefile: 64
file content (46 lines) | stat: -rw-r--r-- 1,443 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\name{mcmc.convert}
\alias{as.matrix.mcmc}
\alias{as.matrix.mcmc.list}
\alias{as.array.mcmc.list}
\alias{as.mcmc.mcmc.list}
\title{Conversions of MCMC objects}

\usage{
as.matrix(x, iters = FALSE, chains = FALSE))
as.array.mcmc.list(x, drop, ...)
}

\arguments{
  \item{x}{An \code{mcmc} or \code{mcmc.list} object}
  \item{iters}{logical flag: add column for iteration number?}
  \item{chains}{logical flag: add column for chain number? (if mcmc.list)}
  \item{drop}{logical flag: if \code{TRUE} the result is coerced to the
    lowest possible dimension}
  \item{...}{further arguments for future methods}
}

\description{
	These are methods for the generic functions \code{as.matrix()},
	\code{as.array()} and \code{as.mcmc()}.

	\code{as.matrix()} strips the MCMC attributes from an \code{mcmc}
	object and returns a matrix.  If \code{iters = TRUE} then a
	column is added with the iteration number.  For \code{mcmc.list}
	objects, the rows of multiple chains are concatenated and, if
	\code{chains = TRUE} a column is added with the chain number.

	\code{mcmc.list} objects can be coerced to 3-dimensional arrays
	with the \code{as.array()} function.

	An \code{mcmc.list} object with a single chain can be coerced
	to an \code{mcmc} object with \code{as.mcmc()}.  If the argument
	has multiple chains, this causes an error.
}

\seealso{
   \code{\link{as.matrix}},
   \code{\link{as.array}},
   \code{\link{as.mcmc}},
}

\keyword{array}