Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find out which distributions I can use in fitdistrplus in R

Tags:

r

I have some data (x) and want to determine which distribution fits them best. I used:

descdist(x, discrete = FALSE, boot = 1000)
fit.norm<- fitdist(x, "norm")
plot(fit.norm)
fit.norm$aic

and did the same for weibull, gamma and lnorm. In the documentation I could not find a list of which other distributions (and the corresponding syntax) are possible. Does anyone know where I can find this information?

like image 957
horseshoe Avatar asked Oct 15 '25 15:10

horseshoe


2 Answers

From the FAQ you get if you type ??fitdistplus

As documented, we provide initial values for the following distributions: norm, lnorm, exp, pois, cauchy, gamma, logis, nbinom, geom, beta, weibull from the stats package; invgamma, llogis, invweibull, pareto1, pareto from the actuar package.

Documentation also suggests you can use any distribution if you can specify it or find it in a pre-existing package.

like image 151
Jacob Avatar answered Oct 17 '25 05:10

Jacob


Add on to @Jacob's answer, here are two documentation pages I found really helpful where both the distribution names and the R syntax can be seen.

  1. Distributions in the stats package
  2. CRAN Task View: Probability Distributions
like image 30
jxshen Avatar answered Oct 17 '25 06:10

jxshen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!