plot.mvgam_residcor: Plot residual correlations based on latent factors

View source: R/mvgam_residcor-class.R

plot.mvgam_residcorR Documentation

Plot residual correlations based on latent factors

Description

Plot residual correlation estimates from Joint Species Distribution (jsdgam) or dynamic factor (mvgam) models

Usage

## S3 method for class 'mvgam_residcor'
plot(x, cluster = FALSE, ...)

Arguments

x

list object of class mvgam_residcor resulting from a call to residual_cor(..., summary = TRUE)

cluster

Logical. Should the variables be re-arranged within the plot to group the correlation matrix into clusters of positive and negative correlations? Defaults to FALSE

...

ignored

Details

This function plots the significant residual correlations from a mvgam_residcor object, whereby the posterior mean (if robust = FALSE) or posterior median (if robust = TRUE) correlations are shown only those correlations whose credible interval does not contain zero. All other correlations are set to zero in the returned plot

Value

A ggplot object

Author(s)

Nicholas J Clark

See Also

jsdgam(), lv_correlations(), residual_cor()


nicholasjclark/mvgam documentation built on April 17, 2025, 9:39 p.m.