# 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))
Run the code above in your browser using DataLab