# Confidence intervals for parameters of fitted distributions (in R)

I use R package fitdistrplus to fit distributions to my data. Function fitdist does the job and brings point estimates and standard errors of distribution parameters (examples of code are bellow).

1. Is there a general rule how to calculate confidence intervals of parameters when estimated parameters and their standard errors (se) are given?

2. Is normal approximation ("z formula": estimate ± z*se) appropriate? If yes, under which circumstances and for which parameters?

3. Should I additionally use some other R packages to estimate the confidence intervals (I'm especially interested in parameters of discrete distributions, e.g. lambda/mean of a Poisson distribution)?

My code and examples of distributions:

library(fitdistrplus)
data(toxocara)

fitdist(toxocara$number,"pois") ## Fitting of the distribution ' pois ' by maximum likelihood ## Parameters: ## estimate Std. Error ## lambda 8.679245 0.4046719 fitdist(toxocara$number,"nbinom")
## Fitting of the distribution ' nbinom ' by maximum likelihood
## Parameters:
##       estimate Std. Error
## size 0.3971457 0.08289027
## mu   8.6802520 1.93501003

fitdist(toxocara$number,"geom") ## Fitting of the distribution ' geom ' by maximum likelihood ## Parameters: ## estimate Std. Error ## prob 0.1033138 0.01343706 fitdist(toxocara$number, "binom",
fix.arg = list(size = 75),
start = list(prob = 0.11))
## Fitting of the distribution ' binom ' by maximum likelihood
## Parameters:
##       estimate  Std. Error
## prob 0.1157233 0.005073495
## Fixed parameters:
##      value
## size    75

fitdist(toxocara$number,"norm") ## Fitting of the distribution ' norm ' by maximum likelihood ## Parameters: ## estimate Std. Error ## mean 8.679245 1.944728 ## sd 14.157835 1.375130 fitdist(toxocara$number,"exp")
## Fitting of the distribution ' exp ' by maximum likelihood
## Parameters:
##       estimate Std. Error
## rate 0.1152174 0.01582513


You could use the normal approximation here as you say, but it gives intervals that are narrow compared to bootstrapped intervals. The bootstrap confidence intervals are likely to be closer to the truth:

library(fitdistrplus)
data(toxocara)
library(boot)

statistic <- function(x, inds) {fitdist(x[inds],"pois")$estimate} bs <- boot(toxocara$number, statistic, R = 4000)
print(boot.ci(bs, conf=0.95, type="bca"))


BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS Based on 4000 bootstrap replicates

CALL : boot.ci(boot.out = bs, conf = 0.95, type = "bca")

Intervals : Level BCa
95% ( 5.604, 13.737 )
Calculations and Intervals on Original Scale

Compare to 7.88-9.48 if you use mean $\pm$ $2$se. My recommendation would be to use the bootstrapped confidence intervals.