SNorm-class: SNorm distribution

Description Objects from the Class Slots Extends Methods Note Author(s) See Also Examples

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 arguments lower.tail and log.p

q

qgpd, but vectorized and with special treatment of arguments lower.tail and log.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 slot xi of slot param.

mean

signature(object = "SNorm"): wrapped access method for slot mean of slot param.

nu

signature(object = "SNorm"): wrapped access method for slot nu of slot param.

sd

signature(x = "SNorm"): wrapped access method for slot sd of slot param.

xi<-

signature(object = "SNorm"): wrapped replace method for slot xi of slot param.

mean<-

signature(object = "SNorm"): wrapped replace method for slot mean of slot param.

nu<-

signature(object = "SNorm"): wrapped replace method for slot nu of slot param.

sd<-

signature(x = "SNorm"): wrapped replace method for slot sd of slot param.

Note

This class is based on the code provided by the package fGarch by Diethelm Wuertz

Author(s)

Peter Ruckdeschel [email protected]

See Also

dsnorm, AbscontDistribution-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
(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)

Example output

Loading required package: distr
Loading required package: startupmsg
:startupmsg>  Utilities for Start-Up Messages (version 0.9.6)
:startupmsg> 
:startupmsg>  For more information see ?"startupmsg",
:startupmsg>  NEWS("startupmsg")

Loading required package: sfsmisc
:distr>  Object Oriented Implementation of Distributions (version
:distr>  2.8.0)
:distr> 
:distr>  Attention: Arithmetics on distribution objects are
:distr>  understood as operations on corresponding random variables
:distr>  (r.v.s); see distrARITH().
:distr> 
:distr>  Some functions from package 'stats' are intentionally masked
:distr>  ---see distrMASK().
:distr> 
:distr>  Note that global options are controlled by distroptions()
:distr>  ---c.f. ?"distroptions".
:distr> 
:distr>  For more information see ?"distr", NEWS("distr"), as well as
:distr>    http://distr.r-forge.r-project.org/
:distr>  Package "distrDoc" provides a vignette to this package as
:distr>  well as to several extension packages; try
:distr>  vignette("distr").


Attaching package: 'distr'

The following objects are masked from 'package:stats':

    df, qqplot, sd

Loading required package: fBasics
Loading required package: timeDate
Loading required package: timeSeries
Loading required package: fGarch
:distrRmetrics>  Distribution Classes for Distributions from
:distrRmetrics>  Rmetrics (version 2.8.0)
:distrRmetrics> 
:distrRmetrics> 
:distrRmetrics>  For more information see ?"distrRmetrics",
:distrRmetrics>  NEWS("distrRmetrics"), as well as
:distrRmetrics>    http://distr.r-forge.r-project.org/
:distrRmetrics>  Package "distrDoc" provides a vignette to
:distrRmetrics>  this package as well as to several extension
:distrRmetrics>  packages; try vignette("distr").

Distribution Object of Class: SNorm
 xi: 2
 mean: 0
 sd: 1
[1] -0.4037723
[1] 0.1914826
[1] 0.8374454
[1] -1.137878
[1] 2

distrRmetrics documentation built on May 2, 2019, 4:46 p.m.