plot.mcmcn: Plot for an mcmcn Object

Description Usage Arguments Details Examples

View source: R/plot.R

Description

Plot to display Markov chain and sample distribution for "mcmcn" class (sample).

Usage

1
2
## S3 method for class 'mcmcn'
plot(x, type = c("c", "d"), index = NULL)

Arguments

x

An mcmcn object to plot.

type

Charactor vector choosen from c("c", "d"). "c" short for chain, "d" short for distribution.

index

Integer vector specifying dimensions to be displayed.

Details

When the sample is 1-dimensional, the parameter index does not work. Draw the sample by passing "c" for type (the first 500 times and the last 500 times) ~ index line chart, and draw the sample histogram by passing "d" for type. And kernel density estimates.

When the sample is 2 dimensions and above, the parameter index defaults to NULL. By passing "c" for type, draw a line chart of the first two dimensions (first 500 times and last 500 times) of the sample, and pass "d" for type. To plot a scatter plot of the first two dimensions of the sample (used to show the sample). If the parameter index is set as an index array, for example, index = c (2, 3), then pass "c" to draw the samples of the second dimension and the third dimension (the first 500 times and the last 500 times) ~ index respectively Line chart, pass in "d" To plot sample histograms and kernel density estimates for the 2nd and 3rd dimensions, respectively.

Examples

1
2
3
f <- pdff("norm", c(1, 3), matrix(c(1, 0.1, 0.1, 1), nrow = 2))
x.norm <- mtrp(f, 10000, c(3, 3), burn = 0)
plot(x.norm)

hjy78/mcmcn documentation built on Jan. 1, 2020, 1:03 p.m.