View source: R/sn.plot.check.R
| sn.plot.check | R Documentation |
Draws a density-scale histogram of the observed data and overlays a
skew-normal density fitted by sn.fit.robust().
sn.plot.check(
data,
breaks = "FD",
col = "grey85",
border = "white",
curve_col = "#6CC6C6",
lwd = 2,
main = NULL,
xlab = "Values",
add_rug = TRUE,
...
)
data |
A numeric vector containing at least 10 finite observations. |
breaks |
Histogram breaks passed to |
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 |
This visual model check complements, but does not replace, the formal goodness-of-fit tests provided by PBGoF.
Invisibly returns a list containing the fitted DP parameters, histogram object, and coordinates of the fitted density curve.
set.seed(123)
x <- sn::rsn(100, xi = 0, omega = 1, alpha = 4)
sn.plot.check(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.