How to generate distributions given, mean, SD, skew and kurtosis in R?

前端 未结 8 1927
既然无缘
既然无缘 2020-11-28 04:03

Is it possible to generate distributions in R for which the Mean, SD, skew and kurtosis are known? So far it appears the best route would be to create random numbers and tra

8条回答
  •  青春惊慌失措
    2020-11-28 04:37

    One solution for you might be the PearsonDS library. It allows you to use a combination of the first four moments with the restriction that kurtosis > skewness^2 + 1.

    To generate 10 random values from that distribution try:

    library("PearsonDS")
    moments <- c(mean = 0,variance = 1,skewness = 1.5, kurtosis = 4)
    rpearson(10, moments = moments)
    

提交回复
热议问题