check.dist | R Documentation |
Use MASS fitdistr function to find best fitting distribution
check.dist(x)
x |
vector of values |
If x contains integer values, fitdistr is used to check for "negative binomial" or "Poisson" distribution. If x is float following distributions are tested "lognormal", "normal", "exponential","geometric",'gamma'. Solution are ranked according to AIC information criterium. Lowest is best.
Ranked solutions
Pedro Martinez Arbizu
fitdistr
check.dist(rnorm(30,20,1))
# negative binomial distribution from a collection of poisson samples
d <- c()
for(i in 1:20){d=c(d,rpois(50,sample(10:1000,1)))}
check.dist(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.