covar.plot: Plot wavelet variance/covariance

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plot_covar.R

Description

Plots the wavelet variance or covariance for the specified formula. The scale-dependent results are graphically displayed.

Usage

1
2
3
4
5
6
7
8
9
covar.plot(
  formula,
  data,
  coord,
  wavelet = "haar",
  wtrafo = "dwt",
  plot = "covar",
  customize_plot = NULL
)

Arguments

formula

With specified notation according to names in data frame.

data

Data frame.

coord

A matrix of 2 columns with corresponding x,y-coordinates which have to be integer.

wavelet

Type of wavelet: haar, d4, or la8.

wtrafo

Type of wavelet transform: dwt or modwt.

plot

Either var for wavelet variance analysis or covar for wavelet covariance analysis.

customize_plot

Additional plotting parameters passed to ggplot. NOW DEPRECATED

Details

Each variable or pair of variables in formula is passed to wavevar or wavecovar internally, and the result is plotted as a function of level.

Value

A list containing

1. result = a vector of results.

2. plot = a ggplot object

Author(s)

Gudrun Carl

See Also

wavevar, wavecovar

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(carlinadata)
coords <- carlinadata[,4:5]

covariance <- covar.plot(carlina.horrida ~ aridity + land.use - 1,
                         data = carlinadata,
                         coord = coords,
                         wavelet = "d4",
                         wtrafo = 'modwt',
                         plot = 'covar')

covariance$plot
covariance$result

variance <- covar.plot(carlina.horrida ~ aridity + land.use - 1,
                       data = carlinadata,
                       coord = coords,
                       wavelet = "d4",
                       wtrafo = 'modwt',
                       plot = 'var')

variance$plot
variance$result

spind documentation built on Jan. 13, 2021, 6:04 p.m.