Amber
Amber

Reputation: 267

skew normal distribution in multivariate case using matlab

how can we generate random numbers using skew normal distribution in multivariate case?

Upvotes: 2

Views: 1836

Answers (1)

daroczig
daroczig

Reputation: 28682

Use the rsn function from the sn package in R (as I think from another question that R will work for you also):

rsn(n=100, location=1.256269, scale=1.605681, shape=5)

Will generate 100 (n) random numbers from a skew-normal distribution with the required location, scale and shape. Use higher sample size for plotting, e.g.:

hist(rsn(n=10000, location=1.256269, scale=1.605681, shape=5))

alt text

Upvotes: 3

Related Questions