sn.plot.check: Graphical Check of a Fitted Skew-Normal Distribution

View source: R/sn.plot.check.R

sn.plot.checkR Documentation

Graphical Check of a Fitted Skew-Normal Distribution

Description

Draws a density-scale histogram of the observed data and overlays a skew-normal density fitted by sn.fit.robust().

Usage

sn.plot.check(
  data,
  breaks = "FD",
  col = "grey85",
  border = "white",
  curve_col = "#6CC6C6",
  lwd = 2,
  main = NULL,
  xlab = "Values",
  add_rug = TRUE,
  ...
)

Arguments

data

A numeric vector containing at least 10 finite observations.

breaks

Histogram breaks passed to graphics::hist().

col

Fill color for the histogram.

border

Border color for histogram bars.

curve_col

Color of the fitted skew-normal density curve.

lwd

Line width of the fitted density curve.

main

Main plot title.

xlab

Label for the horizontal axis.

add_rug

Logical; whether to add observations as a rug plot.

...

Additional graphical arguments passed to graphics::hist().

Details

This visual model check complements, but does not replace, the formal goodness-of-fit tests provided by PBGoF.

Value

Invisibly returns a list containing the fitted DP parameters, histogram object, and coordinates of the fitted density curve.

Examples

set.seed(123)
x <- sn::rsn(100, xi = 0, omega = 1, alpha = 4)
sn.plot.check(x)

PBGoF documentation built on Oct. 2, 2026, 5:09 p.m.