SNorm-class {distrRmetrics} | R Documentation |
SNorm distribution
Description
The skew normal distribution.
Objects from the Class
Objects can be created by calls of the form new("SNorm", mean, sd,xi)
.
More frequently they are created via the generating function
SNorm
.
Slots
img
Object of class
"Reals"
.param
Object of class
"SNormParameter"
.r
rgpd
d
dgpd
p
pgpd
, but vectorized and with special treatment of argumentslower.tail
andlog.p
q
qgpd
, but vectorized and with special treatment of argumentslower.tail
andlog.p
gaps
(numeric) matrix or
NULL
.withArith
logical: used internally to issue warnings as to interpretation of arithmetics
.withSim
logical: used internally to issue warnings as to accuracy
.logExact
logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExact
logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Extends
Class "AbscontDistribution"
, directly.
Class "UnivariateDistribution"
, by class "AbscontDistribution"
.
Class "Distribution"
, by class "AbscontDistribution"
.
Methods
- xi
signature(object = "SNorm")
: wrapped access method for slotxi
of slotparam
.- mean
signature(object = "SNorm")
: wrapped access method for slotmean
of slotparam
.- nu
signature(object = "SNorm")
: wrapped access method for slotnu
of slotparam
.- sd
signature(x = "SNorm")
: wrapped access method for slotsd
of slotparam
.- xi<-
signature(object = "SNorm")
: wrapped replace method for slotxi
of slotparam
.- mean<-
signature(object = "SNorm")
: wrapped replace method for slotmean
of slotparam
.- nu<-
signature(object = "SNorm")
: wrapped replace method for slotnu
of slotparam
.- sd<-
signature(x = "SNorm")
: wrapped replace method for slotsd
of slotparam
.
Note
This class is based on the code provided by the package fGarch by Diethelm Wuertz
Author(s)
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
See Also
dsnorm
, AbscontDistribution-class
Examples
(SN <- SNorm(xi=2)) # SN is a skewed normal distribution with nu = 3.
set.seed(1)
r(SN)(1) # one random number generated from this distribution, e.g. -0.4037723
d(SN)(1) # Density of this distribution is 0.1914826 for x = 1.
p(SN)(1) # Probability that x < 1 is 0.8374454.
q(SN)(.1) # Probability that x < -1.137878 is 0.1.
## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
xi(SN) # shape of this distribution is 2.
xi(SN) <- 2.5 # shape of this distribution is now 2.5.
plot(SN)