as.mcmc.metropolis.samples {metropolis} | R Documentation |
Convert glm_metropolis output to mcmc
object from package coda
Description
Allows use of useful functions from coda
package
Usage
## S3 method for class 'metropolis.samples'
as.mcmc(x, ...)
Arguments
x |
an object from the function "metropolis" |
... |
not used |
Details
TBA
Value
An object of type "mcmc" from the coda package
Examples
## Not run:
library("coda")
dat = data.frame(y = rbinom(100, 1, 0.5), x1=runif(100), x2 = runif(100))
res = metropolis_glm(y ~ x1 + x2, data=dat, family=binomial(), iter=10000, burnin=3000,
adapt=TRUE, guided=TRUE, block=FALSE)
res2 = as.mcmc(res)
summary(res2)
## End(Not run)
[Package metropolis version 0.1.8 Index]