R package: Help to Fit of a Parametric Distribution to Non-Censored or Censored Data
Questions tagged [fitdistrplus]
111 questions
1
vote
1 answer
Determining the FWHM from a distribution in R
I have a dataset:
x = c(30, 23, 22, 31, 18, 16, 19, 16, 15, 23, 21, 17, 17, 27, 24, 22, 27, 32, 23, 21, 14, 19, 22, 23, 22, 19, 13, 22, 33, 25, 24, 26, 24, 24, 13, 21, 23, 23, 31, 23, 25, 20, 24, 23, 24, 16, 19, 33, 36, 29, 29, 26, 22, 23, 23, 23,…
user6528780
1
vote
0 answers
Standard Errors of estimate and size "NA" (not NaN) when fitting a negative binomial distribution using fitdist()
This is my first post, so if there is any improvement to be made or further information that I can give please let me know.
I am using R 3.4.3 on a mac running 10.11.6.
I am working with count data. I am interested in the theta/ dispersion/ size…

user
- 11
- 2
1
vote
0 answers
How to plot truncated distributions (truncdist) with fitdistrplus?
I am attempting to plot goodness of fit curves to truncated distributions from the fitdistrplus package using its plot function.
library(fitdistrplus)
library(truncdist)
library(truncnorm)
dataNum <- c(433.6668, 413.0450, 435.9952, 449.7559,…

Christopher Williams
- 41
- 2
- 6
1
vote
0 answers
R fitdist/optim Error code 1
Does anybody knows if there is some additonal information when the fitdist function failed with error code 1.
I guess this means:
error Code 1 indicates that the iteration limit maxit had been reached inside the optimAlghorithmus.
What can I…

Hark
- 115
- 1
- 11
1
vote
1 answer
Error in fitting a zero inflated poisson distribution in R
I'm a R beginner trying to fit a ZIP:
set.seed(5695)
a<-c(rep(0,250),rpois(n=750,lambda=2))
fpoisZI <- fitdist(a, "ZIP", start=list(sigma=sum(a == 0)/length(a), mu=mean(a)))
I think this code should be ok, but then it appears an error message:
The…

CPR
- 11
- 3
1
vote
3 answers
How to find interval prbability for a given distribution?
Suppose I have some data and I fit them to a gamma distribution, how to find the interval probability for Pr(1 < x <= 1.5), where x is an out-of-sample data point?
require(fitdistrplus)
a <-…

Yang Yang
- 858
- 3
- 26
- 49
1
vote
0 answers
Finding the residuals in fitdistrplus package in R
I have code where I use fitdistrplus to fit a Weibull distribution to various data sets and plot the raw data to the CDF.
##Performs Weibull fit using the Maximum GOF Estimations
zFIT<-fitdist(x,"weibull",keepdata = TRUE, method = "mge", gof…

mringo
- 11
- 1
1
vote
1 answer
Place different QQ plot (with different datasets) in the same coordinate system
I can only get the qq plot one by one with different…

J.Zhang
- 53
- 8
1
vote
1 answer
Fit triangular distribution
I have the following data
dat<-c(16.254884, 14.077510, 12.851675, 19.152597, 11.511230,
16.122911, 16.099962, 9.670949, 12.523661, 15.257432, 13.603848,
14.118873, 12.632340, 15.413753, 5.426383, 11.369880, 12.895920,
13.635134,…

ACBe
- 33
- 5
1
vote
1 answer
Fitting truncnorm using fitdistrplus
I am trying to fit a truncated normal distribution to some data. However, I have been running into the following error:

mlinegar
- 1,389
- 1
- 11
- 19
1
vote
0 answers
Trying to find density function data
I am trying to get PDF data points based on my data. It used to work until last night but I am getting awfully small numbers now. What am I doing wrong here?
dgumbel <- function(x,a,b){ # PDF
exp((a - x)/b - exp((a - x)/b))/b
}
pgumbel <-…

user116922
- 51
- 5
1
vote
1 answer
R fit user defined distribution
I am trying to fit my own distribution to my data, find the optimum parameters of the distribution to match the data and ultimately find the FWHM of the peak in the distribution. From what I've read, the package fitdistrplus is the way to do this. I…
user6528780
1
vote
0 answers
R fitdistrplus : Issue in plotting - 'by' argument too much small
I would like to understand the issue with plotting a fitdistrplus object:
ftnb = tryCatch(expr = fitdist(unlist(x[,ftr]),distr="nbinom",discrete = TRUE),
error = function(err) {})
if (class(ftnb) %in% c("fitdist")) {
…

Srivatsa Srinath
- 177
- 2
- 10
1
vote
0 answers
Issue faced while using fitdist inside a tryCatch command in R
I would like to understand the behaviour of tryCatch in my sample code:
require(fitdistrplus)
a = as.data.frame(table(rpois(n = 1000,lambda = 6)))
fitdist(data = a$Freq,distr = "nbinom",discrete = TRUE)
result = tryCatch(expr = (fitdist(data =…

Srivatsa Srinath
- 177
- 2
- 10
1
vote
2 answers
Testing a vector for gamma distribution
I have a problem with a certain vector. I'm tying to find out IF it's gamma-distributed and (if so) what the parameters (shape, rate) are. MY vector has 400 entries but lets take e.g.
x <-…

Flo Chi
- 65
- 2
- 9