bayesPO_fit-class {bayesPO}R Documentation

Class for the result of the MCMC procedure.

Description

Objects of this class are the main objects of this package. They contain much information about the fitted model.

Usage

## S4 method for signature 'bayesPO_fit'
show(object)

## S4 method for signature 'bayesPO_fit'
print(x, ...)

## S3 method for class 'bayesPO_fit'
print(x, ...)

## S4 method for signature 'bayesPO_fit'
summary(object, ...)

## S3 method for class 'bayesPO_fit'
summary(object, ...)

## S4 method for signature 'bayesPO_fit'
names(x)

## S3 method for class 'bayesPO_fit'
names(x)

## S4 method for signature 'bayesPO_fit'
x[[i]]

## S4 method for signature 'bayesPO_fit'
x$name

## S4 method for signature 'bayesPO_fit'
as.array(x, ...)

## S3 method for class 'bayesPO_fit'
as.array(x, ...)

## S4 method for signature 'bayesPO_fit'
as.matrix(x, ...)

## S3 method for class 'bayesPO_fit'
as.matrix(x, ...)

## S4 method for signature 'bayesPO_fit'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S3 method for class 'bayesPO_fit'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S4 method for signature 'bayesPO_fit,bayesPO_fit'
e1 + e2

## S4 method for signature 'bayesPO_fit'
c(x, ...)

Arguments

object

A bayesPO_fit object.

x

A bayesPO_fit object.

...

Ignored in this version.

i

The requested slot.

name

The requested slot.

row.names

NULL or a character vector giving the row names for the data frame. Missing values are not allowed.

optional

logical. If TRUE, setting row names and converting column names to syntactic names is optional. See help('as.data.frame') for more. Leaving as FALSE is recommended.

e1

A bayesPO_fit object.

e2

A bayesPO_fit object with the same slots (except for initial values) as e1.

Value

show and print: The invisible object.

summary: A matrix with the summary statistics of the fit. It is also printed in the print method. The summary can be treated as a matrix, such as retrieving rows/columns and creating tables with the xtable package.

names: A character vector with the available options for the `$` and `[[` methods.

`$` and `[[`: The requested slot. Available options are not necessarily the class slots, and can be checked with the names method.

as.array: An array with dimensions I x C x P, where I stands for number of iterations, C for number of chains and P for total number of parameters. P is actually larger than the number of parameters in the model, as the the generated sizes of the latent processes and the log-posterior are also included. This is organized so that is ready for the bayesplot package functions.

as.matrix: The dimension of the output is I * C x (P + 2), where I stands for number of iterations, C for number of chains and P for total number of parameters. P is actually larger than the number of parameters in the model, as the generated sizes of the latent processes and the log-posterior are also included.

Two extra columns are included to indicate to which chain and to which iteration that draw belongs.

as.data.frame: The dimension of the output is I*C x P + 2, where I stands for number of iterations, C for number of chains and P for total number of parameters. P is actually larger than the number of parameters in the model, as the generated sizes of the latent processes and the log-posterior are also included.

Two extra columns are included to indicate to which chain and to which iteration that draw belongs. This is to facilitate the use of plotting results via the ggplot2 package if desired.

If row.names is left at NULL then row names are created as CcIi where c is the chain and i is the iteration of that row.

+: A new bayesPO_fit object where the chains are combined into a new multi-chain object. This can be used if chains are run in separate occasions or computers to combine them into a single object for analysis.

c: A new bayesPO_fit object where the chains are combined into a new multi-chain object. The + method is used for that, with the same arguments restrictions and results.

Fields

fit

The actual fit from the model. It is an object of class mcmc.list, as generated from the coda package.

original

The model used to generate the chains, an object with class bayesPO_model.

backgroundSummary

A small summary of the original background covariates. This is to ensure that continuing the chains will use the identical background matrix. Only the summary is kept for storage efficiency.

area

A positive number indicating the area measure of the region being studied.

parnames

The names of the parameters. If the model used selects the covariates with column names, they are replicated here. If they are the column indexes, names are generated for identification.

mcmc_setup

The original mcmc setup used.

See Also

fit_bayesPO


[Package bayesPO version 0.5.0 Index]