R: Convert an ERGMM Object to an MCMC list object for...

as.mcmc.list.ergmm {latentnet} | R Documentation

## Convert an ERGMM Object to an MCMC list object for Diagnostics.

### Description

Functions to extract a subset of MCMC-sampled variables from an object of class `ergmm` and construct an `mcmc.list` object.

### Usage

    ## S3 method for class 'list.ergmm'
    as.mcmc(x, burnin = FALSE, which.vars = NULL, vertex.i = c(1), ...)

### Arguments

`x` | An object of class `ergmm`.
`burnin` | If `TRUE`, generates an `mcmc.list` object for the burnin (if stored) instead of the main sampling run.
`which.vars` | A named list mapping variable names to the indices to include. If given, overrides the defaults and all arguments that follow.
`vertex.i` | A numeric vector of vertices whose latent space coordinates and random effects to include.
`...` | Not used at this time.

### Details

Unless `which.vars` is specified, the `mcmc.list` returned also includes all of the covariate coefficients.

Regardless of whether the MCMC run was single- or multi-threaded, this function returns an `mcmc.list`, with a single thread, if necessary.

### Value

A `mcmc.list` object with the sample of the selected subset of the variables.

### See Also

`ergmm`, `mcmc.list`, `mcmc.diagnostics.ergmm`

### Examples

    library(coda)
    data(sampson)
    monks.fit<-ergmm(samplike~euclidean(d=2,G=3))
    monks.fit.mcmc<-as.mcmc.list(monks.fit)
    plot(monks.fit.mcmc)
    raftery.diag(monks.fit.mcmc)

[Package latentnet version 2.10.5 Index]