D.SN: Derivatives of Normalized Skewed Normal Parameterized by...

Description Usage Arguments Details Value References See Also Examples

View source: R/Package_BasicSetting.r

Description

Calculate the derivatives of Skewed Normal density with location = 0 and scale = 1 when parameterized by shape parameter. The probability density function (pdf) is a bivariate function, wrt. y and a. The first and second derivatives are calculated.

Usage

1
D.SN(y,a)

Arguments

y

vector or matrix of quantiles, taking values in the real line; Missing values (NA's) and Inf's are allowed

a

vector or matrix of shape parameters, taking values in the real line; should have the same dimension as y

Details

In general, a skewed normal is parameterized by three parameters (location, scale, shape). It is referred as normalized skewed normal distribution in some cases when location = 0 and scale = 1. A normalized skewed normal distribution with location = 0 and scale = 1 has the density

f(x, a) = 2 φ(x) Φ(x * a),

where a is the shape parameter; here φ is the pdf of the standard normal distribution, and Φ is the corresponding cdf. The function D.SN(x,a) calculates the function value of f(x,a), along with the first and second order derivatives.

Value

A list with the following components

sn

function value of f(x, a)

sn1

the first derivative f'(x,a) wrt. x

sn11

the second derivative f''(x,a) wrt. x

sn12

the cross-partial f''(x,a) wrt. x and a

sn2

the first derivative f'(x,a) wrt. a

sn22

the second derivative f''(x,a) wrt. a

References

[1]. Azzalini, A. (1985). A class of distributions which includes the normal ones. Scandinavian Journal of Statistics, 171-178.

[2]. A very brief introduction to the skew-normal distribution

See Also

skewness.cp, shape.dp, dsn

Examples

1
2
3
4
5
ret1 <- D.SN(0.1, 10)   # y = 0.1, a = 10
ret2 <- D.SN(-0.1, -10) # y = -0.1, a = 10
ret3 <- D.SN(rnorm(10), rnorm(10))   # y and a are a vector
# y and a are matrices
ret4 <- D.SN(matrix(rnorm(10), 2, 5), matrix(rnorm(10), 2, 5)) 

Example output

Loading required package: sn
Loading required package: stats4

Attaching package: 'sn'

The following object is masked from 'package:stats':

    sd

cSFM documentation built on May 29, 2017, 6:10 p.m.

Related to D.SN in cSFM...