I need to characterize the location, shape, and scale of a skew normal distribution of data, and then use these parameters to draw values randomly from a skew-normal distribution with the same parameters. In the past I did this using the sn
package in R. So, for example, if I had a vector of data, v
, that follows a skew-normal distribution, I would estimate the location, shape and scale using the sn.em
function:
require(sn)
data(ais)
v <- ais$Fe
sn.em(,v)
I would then draw randomly from a skew-normal dsitrubtion with the same parameters using the rsnorm
function:
rsnorm(100, shape = x, location = y, scale = z)
Both of these functions no longer exist in the sn
package. How can I do this with either different functions in the sn
package or a different pacakge all together?
Use sn.mple() function in "sn" package. For your example, you may use
To draw a sample from SN distribution, use rsn() function in the same package. For instance,