Plots the output of an ensemble correlation analysis.

plotCorEns(
  corout,
  bins = 40,
  line.labels = corout$cor.stats$percentiles,
  add.to.plot = ggplot2::ggplot(),
  legend.position = c(0.2, 0.8),
  f.sig.lab.position = c(0.15, 0.4),
  sig.level = 0.05,
  significance.option = "isospectral",
  use.fdr = TRUE,
  bar.colors = c("grey50", "Chartreuse4", "DarkOrange")
)

Arguments

corout

output from corEns()

bins

Number of bins in the histogram

line.labels

Labels for the quantiles lines

add.to.plot

A ggplot object to add these lines to. Default is ggplot()

legend.position

Where to put the map legend?

f.sig.lab.position

x,y (0-1) position of the fraction of significant correlation labels

sig.level

What significance level to plot?

significance.option

Choose how handle significance. Options are:

  • "raw" for uncorrected p-values

  • "eff-n" to adjust the test's sample size to reflect the reduction in degrees of freedom due to autocorrelation

  • "isopersistent" to estimate significance by generating surrogates, or random synthetic timeseries, that emulate the persistence characteristics of the series.

  • "isospectral" A non-parametric alternative which estimates significance by generating surrogates by scrambling the spectral phases of the two datasets, thus preserving their power spectrum while destroying the correlated signal. This is the recommended (and default) option.

use.fdr

Use results from False Discovery Rate testing in plot?

bar.colors

What colors to use for the bars, formatted as (insignificant, significant, significant after FDR)

Value

A ggplot object

Author

Julien Emile-Geay

Nick McKay