statrefs home‎ > ‎Main‎ > ‎Software‎ > ‎R‎ > ‎

Distributions in R


 
From the Revolution Analystics blog at http://blog.revolutionanalytics.com/2010/08/distributions-in-r.html


Distributions in R

One of the R language's most powerful features is its ability to deal with random distributions: not just generating random numbers from various distributions (based on a very powerful pseudo-random number generator), but also calculating densities, probabilities, and quintiles. John Cook provides a handy reference chart listing all of the distributions supported by standard R (reproduced below -- and there are many other distributions supported by contributed packages), and also explains the elegant naming scheme for the various functions.


Distribution Base name    Parameters
beta beta shape1, shape2, ncp
binomial binom size, prob
Cauchy cauchy location, scale
chi-squared chisq df, ncp
exponential exp rate
F f df1, df2, ncp
gamma gamma shape, rate
geometric geom p
hypergeometric hyper m, n, k
log-normal lnorm meanlog, sdlog
logistic logis location, scale
negative binomial nbinom size, prob
normal norm mean, sd
Poisson pois lambda
Student t t df, ncp
uniform unif min, max
Weibull weibull shape, scale

 

 
Comments