Bluder Olivia
2008-Jun-13 13:17 UTC
[R] Maximum likelihood estimation in R with censored Data
Hello, I'm trying to calculate the Maximum likelihood estimators for a dataset which contains censored data. I started by using the function "nlm", but isn't there a separate method for doing this for e.g. the "weibull" and the "log-normal" distribution? Thanks, Olivia [[alternative HTML version deleted]]
Ben Bolker
2008-Jun-13 17:55 UTC
[R] Maximum likelihood estimation in R with censored Data
Bluder Olivia <olivia.bluder <at> k-ai.at> writes:> > Hello, > > I'm trying to calculate the Maximum likelihood estimators for a dataset > which contains censored data. > > I started by using the function "nlm", but isn't there a separate method > for doing this for e.g. the "weibull" and the "log-normal" distribution? > > Thanks, > > OliviaThis is not *quite* enough detail about what you want to do. Can you (as the posting guide suggests!) give us a small example of what you want to do? You may be able to do this via the survreg() command in the survival package, or you may want to do it yourself by constructing a log-likelihood function with dweibull() for uncensored data and pweibull() for censored data [or dlnorm/plnorm]. Ben Bolker
Thomas Lumley
2008-Jun-15 15:46 UTC
[R] Maximum likelihood estimation in R with censored Data
Try survreg(), in the survival package. -thomas On Fri, 13 Jun 2008, Bluder Olivia wrote:> Hello, > > > > I'm trying to calculate the Maximum likelihood estimators for a dataset > which contains censored data. > > > > I started by using the function "nlm", but isn't there a separate method > for doing this for e.g. the "weibull" and the "log-normal" distribution? > > > > Thanks, > > Olivia > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle