locationImage: Location Density Image

Description Usage Arguments Details Value

Description

Bin locations to form a 2D density image

Usage

1
2
locationImage(s, xlim, ylim, nx, ny, weight = rep_len(1, dim(s)[1L]),
  discard = 0, collapse = TRUE, chains = NULL)

Arguments

s

a single chain or a list of parallel chains generated by estelleMetropolis or stellaMetropolis.

xlim

range of the first coordinate.

ylim

range of the second coordinate.

nx

number of cells in the first coordinate.

ny

number of cells in the second coordinate.

weight

weights for each location.

discard

number of initial samples to discard.

collapse

whether to collapse parallel chains to a single chain

chains

the set of chains to retain, or NULL.

Details

Bins the samples for a sequence of locations to produce 2D array suitable for plotting with image. Optionally, a vector of weights can be provided to differentially weight samples by location.

This function accepts either a sample from a single mcmc run, or a list of samples from parallel mcmc runs. If collapse is true, multiple samples are merged and single image is returned, otherwise an image is returned for each sample.

Value

A list with elesments

x

the x-ordinates that bound the bins

y

the y-ordinates that bound the bins

W

the weighted image.


KateGoodenough/RoL-SGAT documentation built on June 11, 2019, 1:29 p.m.