plot.dsspMod {DSSP}R Documentation

Diagnostic, Density and Contour Plots

Description

Diagnostic, Density and Contour Plots

Usage

## S3 method for class 'dsspMod'
plot(
  x,
  robust_residuals = TRUE,
  contour_plots = TRUE,
  nx = 100,
  ny = 100,
  nlevels = 5,
  ...
)

Arguments

x

an object of class dsspMod

robust_residuals

whether to use robust residuals (median of predicted). Default to be TRUE.

contour_plots

whether or not to return a second panel with contour plots. Defaults to TRUE

nx

dimension of output grid in x direction. Used for interpolation (akime::interp()).

ny

dimension of output grid in y direction. Used for interpolation (akime::interp()).

nlevels

number of levels used in contour plot.

...

additional arguments that are passed to ggplot2::scale_fill_distiller().

Value

a list containing the plots printed (individually and together in grid)

Examples

library(sp)
library(gstat)
data(meuse.all)
coordinates(meuse.all) <- ~ x + y

f <- function(x) -x ## log-prior for exponential distribution for the smoothing parameter

## Draw 100 samples from the posterior of eta given the data y.
OUTPUT <- DSSP(
  formula = log(zinc) ~ 1, data = meuse.all, N = 100,
  pars = c(0.001, 0.001), log_prior = f
)
plot(OUTPUT, contour_plots = FALSE)

[Package DSSP version 0.1.1 Index]