plot.geoevgam: Plot results of a geoevgam fit

View source: R/geoevgam.R

plot.geoevgamR Documentation

Plot results of a geoevgam fit

Description

Plot results of a geoevgam fit

Usage

## S3 method for class 'geoevgam'
plot(
  x,
  type = c("threshold", "excess"),
  view = c("polar", "cartesian"),
  norm,
  margins = "original",
  ...
)

Arguments

x

An object of class geoevgam.

type

Character vector specifying plot types: "threshold", "excess", "gauge", or "qqplot".

view

Character specifying the coordinate system for gauge plots: "polar" or "cartesian".

norm

Numeric; the norm to use for the gauge plot. Defaults to the norm used in object.

margins

Character; margin type for QQ-plots. Defaults to "original".

...

Additional arguments passed to the underlying plot functions.

Examples


n <- 1e3
gauss_sim_data <- rmvnorm(n, numeric(2), matrix(c(1, .8, .8, 1), 2))
laplace_sim_data <- qlaplace(pnorm(gauss_sim_data))
polar1 <- polarise(t(laplace_sim_data), norm = 2)
data1 <- data.frame(radius = polar1$r, angle = polar1$phi[1, ])
fit1 <- geoevgam(data = data1)
plot(fit1)
plot(fit1, type = 'gauge', col = 2, lwd = 2, view = 'cartesian')
par(mfrow = c(2, 2))
plot(fit1, type = 'qqplot')
plot(fit1, type = 'qqplot2')
plot(fit1, type = 'qqplot', margins = 'uniform')
plot(fit1, type = 'qqplot2', margins = 'uniform')


# example using L_1 norm
polar2 <- polarise(t(laplace_sim_data), norm = 1)
data2 <- data.frame(radius = polar2$r, angle = polar2$phi[1, ])
fit2 <- geoevgam(data = data2, norm = 1) 
# passing norm ensures plotted gauge is correct
plot(fit2, type = 'gauge', col = 2, lwd = 2, view = 'cartesian')



evgam documentation built on Sept. 3, 2026, 5:09 p.m.