Description Usage Arguments Details Author(s) See Also Examples

This function plots a numerical matrix, and is often used to plot the following matrices: correlation, covariance, distance, and precision.

1 2 |

`x` |
This required argument is a numerical matrix, or an
object of class |

`col` |
This argument specifies the colors of the circles. By
default, the |

`cex` |
When |

`circle` |
Logical. When |

`order` |
Logical. This argument defaults to |

`zlim` |
When |

`title` |
This argument specifies the title of the plot, and the
default does not include a title. When |

`PDF` |
Logical. When |

`...` |
Additional arguments are unused. |

The `plotMatrix`

function produces one of two styles of plots,
depending on the `circle`

argument. A *K x K*
numeric matrix of *K* parameters or variables is plotted. The plot
is a matrix of the same dimensions, in which each element is colored
(and sized, when `circle=TRUE`

) according to its value.

Although `plotMatrix`

does not provide the same detail as a
numeric matrix, it is easier to discover elements of interest
according to color (and size when `circle=TRUE`

).

The `plotMatrix`

function is not inherently Bayesian, and does
not include uncertainty in matrices. Nonetheless, it is included
because it is a useful graphical presentation of a numeric matrices,
and is recommended to be used with the posterior correlation matrix in
an object of class `posteriorchecks`

.

When `x`

is an object of class `bayesfactor`

, matrix
`B`

is plotted. When `x`

is an object of class
`demonoid`

(if it is a matrix), `iterquad`

, `laplace`

,
`pmc`

, or `vb`

, the covariance matrix `Covar`

is
plotted. When `x`

is an object of class `posteriorchecks`

,
the posterior correlation matrix is plotted.

This is a modified version of the `circle.corr`

function
of Taiyun Wei.

Taiyun Wei

1 2 3 4 5 6 7 8 | ```
library(LaplacesDemon)
### Although it is most commonly used with an object of class
### posteriorchecks, it is applied here to a different correlation matrix.
data(mtcars)
plotMatrix(cor(mtcars), col=colorRampPalette(c("green","gray10","red"))(100),
cex=1, circle=FALSE, order=TRUE)
plotMatrix(cor(mtcars), col=colorRampPalette(c("green","gray10","red"))(100),
cex=1, circle=TRUE, order=TRUE)
``` |

LaplacesDemon documentation built on July 1, 2018, 9:02 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.