1

I'm trying to fit a truncated normal distribution to data using fitdistrplus::fitdistr and specifying upper and lower bounds. However, when comparing the MLE-fitted parameters to those of an MLE-fit without bounds, they seem to be the same.

library(fitdistrplus)
library(MASS)
dt <- rnorm(100, 1, 0.5)
cat("truncated:", fitdistr(dt, "normal",  lower = 0, upper = 1.5, method = "mle")$estimate, 
"original:", fitdist(dt, "norm", method = "mle")$estimate, sep = "\n")

truncated:
1.034495
0.4112629
original:
1.034495
0.4112629

I'm not a statistics genius, but I'm pretty sure that parameters should be different because truncating the distribution, both mean and sd will change (because the distribution is rescaled). Is this right?

Thanks for your advice

Cheers,

Simon

e-cology
  • 11
  • 3
  • 1
    `lower=` and `upper=` don't create a truncated distribution. Those are just passed through to `optim()` where they control where it looks for the optimal value. It does not change the distribution. – MrFlick Feb 09 '16 at 05:34
  • Thanks, that is very helpful! I had been trying to fit truncated fire size distributions according to this example: [link](http://stackoverflow.com/questions/16947799/fitting-a-lognormal-distribution-to-censored-data-in-r) But `optim` threw errors, presumably because I didn't specify a lower bound for standard deviation and it started testing negative values. I will go back to that and see if specifying bounds sorts that problem out. – e-cology Feb 09 '16 at 21:56

0 Answers0