Hello, maybe that my Question is a "beginner"-Question, but up to now, my research didn't bring any useful result. I'm trying to fit a distribution (e.g. lognormal) to a given set of data (ML-Estimation). I KNOW about my data that there is a truncation for all data below a well known threshold. Is there an R-solution for an ML-estimation for this kind of data-problem? As far as I've seen the "fitdistr" in package "MASS" doesn't solve this problem. Thank you for any information! Regards, Carsten [[alternative HTML version deleted]]
On Mon, 31 Jan 2005, Carsten Steinhoff wrote:> maybe that my Question is a "beginner"-Question, but up to now, my research > didn't bring any useful result. > > I'm trying to fit a distribution (e.g. lognormal) to a given set of data > (ML-Estimation). I KNOW about my data that there is a truncation for all > data below a well known threshold. Is there an R-solution for an > ML-estimation for this kind of data-problem? As far as I've seen the > "fitdistr" in package "MASS" doesn't solve this problem.I can intrepret that two ways. If you have a truncated lognormal distribution on say (-a, Inf), fitdistr will do this: you just need to give it the density of the truncated distribution. If the observations are rather censored (they are smaller than something, but the value is not otherwise known), for a lognormal you can use survreg with reversed time. Function mle() in package stats4 is useful for general MLE problems. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
"Carsten Steinhoff" <carsten.steinhoff at stud.uni-goettingen.de> writes:> Hello, > > > > maybe that my Question is a "beginner"-Question, but up to now, my research > didn't bring any useful result. > > > > I'm trying to fit a distribution (e.g. lognormal) to a given set of data > (ML-Estimation). I KNOW about my data that there is a truncation for all > data below a well known threshold. Is there an R-solution for an > ML-estimation for this kind of data-problem? As far as I've seen the > "fitdistr" in package "MASS" doesn't solve this problem. > > > > Thank you for any information!Truncated or censored? (i.e. do you know that an observation is below threshold or is such an observation just never seen?) If it really is truncated, just use fitdistr on function(x,m,s) dlnorm(x, m, s) / plnorm(threshhold, m, s, lower.tail=FALSE) if censored, use fitdistr on function(x,m,s) ifelse(x > threshold, dlnorm(x, m, s), plnorm(threshhold, m, s) [which, for the mathematically inclined, *is* a density w.r.t. the sum of a continuous measure on a half-line and a point measure at the threshold] -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907