plot_correlation_function: Plot the correlation function

View source: R/correlation-function.R

plot_correlation_functionR Documentation

Plot the correlation function

Description

Plot the correlation function

Usage

plot_correlation_function(
  d,
  theta,
  corr_fun = "exponential",
  base_size = 12,
  file = NULL,
  width = 16,
  height = 9
)

Arguments

d

is an n x 1 vector of distances

theta

is the correlation function parameters. If corr_fun is "matern", then theta is a 2-dimensional vector of Matern covariance parameter inputs on the log-scale with the first element the Matern range parameter range on the log-scale and second element the Matern smoothness parameter nu on the log-scale. If corr_fun is "exponential" then theta is a positive number representing the exponential correlation function range parameter on the log-scale.

corr_fun

is the correlation function

base_size

The base size for the plot

file

If file = NULL, the ggplot object is returned. If file is not NULL, an image is saved to the file path specified by file

width

If a file path is specified, width determines the width of the saved image (in inches)

height

If a file path is specified, height determines the height of the saved image (in inches)

Value

Either a ggplot object of the model trace plots (if file = NULL) or a saved image file with no return (file is not NULL)


jtipton25/pgR documentation built on July 8, 2022, 12:44 a.m.