Skip to contents

Plots the empirical variogram generated by s_variogram

Usage

plot_s_variogram(variog_output, plot_envelope = FALSE, color = "royalblue1")

Arguments

variog_output

The output generated by the function s_variogram.

plot_envelope

A logical value indicating if the envelope of spatial independence generated using the permutation test must be displayed (plot_envelope = TRUE) or not (plot_envelope = FALSE). By default plot_envelope = FALSE. Note: if n_permutation = 0 when running the function s_variogram, the function will display an error message because no envelope can be generated.

color

If plot_envelope = TRUE, it sets the colour of the envelope; run vignette("ggplot2-specs") for more details on this argument.

Value

A ggplot object representing the empirical variogram plot, optionally including the envelope of spatial independence.

Details

This function plots the empirical variogram, which shows the spatial dependence structure of the data. If plot_envelope is set to TRUE, the plot will also include an envelope indicating the range of values under spatial independence, based on a permutation test.

See also