SSN: Standard Skewed Normal Parameterized using Skewness.

Description Usage Arguments Details Value See Also Examples

Description

Calculate the density function, log density function, and derivatives of the standard skewed normal (SSN) distribution parameterized using skewness.

Usage

1
2
g(y, gamma, log = FALSE)
D.lg(y, gamma)

Arguments

y

function arigument, taking values in the real line

gamma

skewness parameter; should have the same dimension as y

log

logical; if TRUE, the log of g(y, gamma) is given

Details

Calculate the pdf (probability density function) and derivatives of standard skewed normal when parameterized by skewness.

Value

g(y, gamma) gives the pdf value at y and gamma as the skewness; g(y, gamma, log = TRUE) gives the log of the pdf value at y and gamma as the skewness; D.lg(y, gamma) gives the list of derivatives of the log pdf at y and gamma with the following components:

D1

1st derivative of log.g(y,gamma) wrt. y

D2

1st derivative of log.g(y,gamma) wrt. gamma

D12

2nd cross-partial derivative of log.g(y,gamma) wrt. y and gamma

D11

2nd derivative of log.g(y,gamma) wrt. y

D22

2nd derivative of log.g(y,gamma) wrt. gamma

See Also

D.SN, shape.dp, skewness.cp, D.gamma

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# pdf of SSN
ret1 <- g(seq(-3, 3, length = 100), 0.9)  
# plot the pdf
plot(seq(-3, 3, length = 100), ret1, type = "l", 
     xlab = "x", ylab = "pdf", main = "Plot of Stardard Skewed Normal Density")
# derivatives of pdf 
ret2 <- D.lg(10, 0.5) 
# y and a are a vector
ret3 <- D.lg(rnorm(10), seq(0.1,0.5,length = 10))   
# y and a are matrices
ret4 <- D.lg(matrix(rnorm(10), 2, 5), matrix(seq(0.1,0.5,length = 10), 2, 5))

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

Related to SSN in cSFM...