Learn R Programming

EDISON (version 1.1.1)

output: Collects and saves output.

Description

This function collects the network, changepoint and hyperparameter samples taken from the MCMC simulation, and saves them to a file if appropriate.

Usage

output(counters, listStock, GLOBvar, HYPERvar, OUTvar)

Arguments

counters
List of counters for the number of moves that have been proposed and accepted.
listStock
Network, changepoint and hyperparameter samples.
GLOBvar
Global variables of the MCMC simulation.
HYPERvar
Hyperparameter variables.
OUTvar
Output variables, including the output file.

Value

Returns a list with an element for each target node which is also a list. Each sublist containts the elements:
cp_samples
Changepoint samples, a NumSamples by MaxNumChangePoints matrix.
edge_samples
Network samples (with regression parameters), a NumSamples by (NumSegs * NumNodes) matrix.
target
The target node for this subnetwork.
hyper_samples
Information sharing prior hyperparameter samples, a NumSamples by NumHyperParams matrix.
sampled
Sampled iterations.
counters
Counters for the number of proposed and accepted moves.