CIBgraph: CIBGraph

View source: R/CIBgraph.R

CIBgraphR Documentation

CIBGraph

Description

Take your CIB transition matrix for a particular transition rule, and produce the corresponding graph.

Usage

CIBgraph(
  Transitions,
  weight = NULL,
  target = 1,
  cutoffMultiplier = 10^-4,
  layout = layout_with_dh
)

Arguments

Transitions

A stochastic transition matrix (rows are presumed to add to 1). Can be generated by any of the function referenced in CIBTransitionCalculators

weight

How much weight do you wish to give each node; most often proportional to your forecast probability. If no value is given, all nodes will be the same size.

target

All nodes are going to be colour coded. Based on which factor do you want to colour code them? This value takes on integer values.

cutoffMultiplier

For the sake of reasonable visualization, CIBGraph will, by default, ignore all edges with probability less than 10^-4. If you wish to include all edges, set this value to 0. If you wish to neglect more edges, set this cut off higher, for example 10^-2.

layout

CIBgraph uses the package igraph internally in order to draw your markov chain. By default we use "layout_with_dh" to layout the nodes. If you'd prefer a different layout, select one here. See the R igraph manual for details.

Value

NULL. Function generates a picture, but has not return type.

Author(s)

Alastair Jamieson Lane. <aja107@math.ubc.ca>

Examples

data(ExampleCIBdata)
boltzTrans<-LocalBoltzmann(ExampleCIBdata)
forecast<- CIBforecast(boltzTrans)
CIBgraph(boltzTrans,forecast[[1]])
CIBgraph(boltzTrans,forecast[[1]],2)
CIBgraph(boltzTrans,forecast[[1]],2,0)
CIBgraph(boltzTrans,forecast[[1]],2,10^-4,layout.grid)

alastair-JL/StochasticCIB documentation built on July 27, 2023, 1:12 a.m.