R package: Help to Fit of a Parametric Distribution to Non-Censored or Censored Data
Questions tagged [fitdistrplus]
111 questions
13
votes
2 answers
Fitting a normal distribution in R
I'm using the following code to fit the normal distribution. The link for the dataset for "b" (too large to post directly) is :
link for b
setwd("xxxxxx")
library(fitdistrplus)
require(MASS)
tazur <-read.csv("b", header= TRUE,…

zkhan
- 157
- 1
- 2
- 10
12
votes
1 answer
Making fitdist plots with ggplot2
I fitted the normal distribution with fitdist function from fitdistrplus package. Using denscomp, qqcomp, cdfcomp and ppcomp we can plot histogram against fitted density functions, theoretical quantiles against empirical ones, the empirical…

MYaseen208
- 22,666
- 37
- 165
- 309
6
votes
2 answers
Error in fitdist with gamma distribution
Below are my codes:
library(fitdistrplus)
s <- c(11, 4, 2, 9, 3, 1, 2, 2, 3, 2, 2, 5, 8,3, 15, 3, 9, 22, 0, 4, 10, 1, 9, 10, 11,
2, 8, 2, 6, 0, 15, 0 , 2, 11, 0, 6, 3, 5, 0, 7, 6, 0, 7, 1, 0, 6, 4, 1, 3, 5,
2, 6, 0, 10, 6, 4, 1, 17, 0, 1, 0, 6,…

Chuan
- 61
- 1
- 2
5
votes
0 answers
Golang equivalent of fitdistrplus in R?
I'm trying to reproduce fitting a beta distribution in Go, given an input of floating-point rates:
rates = [0.20, 0.15, 0.002, 0.017, 0.181, 0.004, ...]
You can do this in R quite easily using fitdistrplus, which chooses reasonable starting values…

Tallboy
- 12,847
- 13
- 82
- 173
5
votes
1 answer
Error when fitting a beta distribution: the function mle failed to estimate the parameters with error code 100
I'm trying to use fitdist () function from the fitdistrplus package to fit my data to different distributions. Let's say that my data looks like:
x = c (1.300000, 1.220000, 1.160000, 1.300000, 1.380000, 1.240000,
1.150000, 1.180000, 1.350000,…

elcortegano
- 2,444
- 11
- 40
- 58
5
votes
3 answers
Fitting a Gumbel distribution with fitdistrplus
I'm trying to reproduce the code from this answer, however I have problems in doing so. I'm using the gumbel distribution from package VGAM and fitdistrplus.
The problem emerges when doing:
fit = fitdist(data1, 'gumbel', start = list(location = 0,…

AF7
- 3,160
- 28
- 63
4
votes
2 answers
How do I obtain values from a graphic?
I did a distribution fit and was taking a look at the Q-Q-Plot and was wondering if there is an easy way to get the corresponding values from the graphic.
library("fitdistrplus")
data <- c(1050000, 1100000, 1230000, 1300000, 1450000, 1459785,…

Norbi
- 69
- 4
3
votes
1 answer
Fitting of Pearson Type III in R using fitdist
I have fitted many distributions to my data but I am facing difficulty in fitting Pearson type III distribution to the data. I also used plotdist function to find starting or initial values in order to fit the distribution using iterative method.The…

Kazim Khan
- 31
- 2
3
votes
1 answer
Why aren't any points showing up in the qqcomp function when using plotstyle="ggplot"?
I want to compare the fit of different distributions to my data in a single plot. The qqcomp function from the fitdistrplus package pretty much does exactly what I want to do. The only problem I have however, is that it's mostly written using base R…

Denzo
- 240
- 1
- 7
3
votes
1 answer
How to fit an inverse guassian distribution to my data, preferably using fitdist {fitdistrplus}
I am trying to analyze some Reaction Time data using GLMM. to find a distribution that fits my data best.I used fitdist() for gamma and lognormal distributions. the results showed that lognormal fits my data better.
However, recently i read that…
user11844060
3
votes
1 answer
mle failed to estimate the parameters with the error code 7
I'm trying to estimate the Weibull-Gamma Distribution parameters, but I'm encountering the following error:
"the function mle failed to estimate the parameters, with the error
code 7"
What do I do?
The Weibull-Gamma Distribution
Density Function…

user55546
- 37
- 1
- 15
3
votes
1 answer
How to make the axes start from zero in package fitdistrplus in R
I use function fitdist in package fitdistrplus to get the best distribution fitted to my data and draw the ppcomp figure , I use the example codes of ?fitdistrplus to replace my data and codes.
data(groundbeef)
serving <- groundbeef$serving
fitW <-…

Ling Zhang
- 281
- 1
- 3
- 13
3
votes
1 answer
Power law fitted by `fitdistr()` function in package `fitdistrplus`
I generate some random variables using rplcon() function in package poweRlaw
data <- rplcon(1000,10,2)
Now, I want to know which known distributions fit the data best. Lognorm? exp? gamma? power law? power law with exponential cutoff?
So I use…

Ling Zhang
- 281
- 1
- 3
- 13
3
votes
2 answers
Trouble with 'fitdistrplus' package, t-distribution
I am trying to fit t-distributions to my data but am unable to do so. My first try was
fitdistr(myData, "t")
There are 41 warnings, all saying that NaNs are produced. I don't know how, logarithms seem to be involved. So I adjusted my data somewhat…

Erik Vesterlund
- 481
- 6
- 19
2
votes
1 answer
Fit Poisson binomial distribution to data
I keep hitting the same error when trying to fit distribution to data using fitdistrplus. MWE is below. In short, I want to fit a Poisson binomial distribution to some data. I'm using the poibin R package for the Poisson binomial p,d,q,r functions…

Tad Dallas
- 1,179
- 5
- 13