Kaspar Pflugshaupt
2001-Aug-28 13:11 UTC
[R] Estimating Weibull Distribution Parameters - very basic question
Hello, is there a quick way of estimating Weibull parameters for some data points that are assumed to be Weibull-distributed? I guess I'm just too lazy to set up a Maximum-Likelihood estimation... ...but maybe there is a simpler way? Thanks for any hint (and yes, I've read help(Weibull) ;) Kaspar Pflugshaupt -- Kaspar Pflugshaupt Geobotanical Institute ETH Zurich, Switzerland -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Dalgaard BSA
2001-Aug-28 14:10 UTC
[R] Estimating Weibull Distribution Parameters - very basic question
Kaspar Pflugshaupt <pflugshaupt at geobot.umnw.ethz.ch> writes:> Hello, > > is there a quick way of estimating Weibull parameters for some data points > that are assumed to be Weibull-distributed? > > I guess I'm just too lazy to set up a Maximum-Likelihood estimation... > ...but maybe there is a simpler way? > > Thanks for any hint (and yes, I've read help(Weibull) ;)How hard can it be: x <- rweibull(200,5) loglike<-function(p) -2*sum(dweibull(x,p[1],p[2],log=T)) optim(c(1,5),loglike) You might want to refine that a little, but the possibility of finding maximum likelihood estimates by writing up the likelihood and maximizing it is ofte overlooked... -- 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 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Emmanuel Paradis
2001-Aug-28 16:36 UTC
[R] Estimating Weibull Distribution Parameters - very basic question
At 15:11 28/08/01 +0200, you wrote:>Hello, > >is there a quick way of estimating Weibull parameters for some data points >that are assumed to be Weibull-distributed? > >I guess I'm just too lazy to set up a Maximum-Likelihood estimation... >...but maybe there is a simpler way? > >Thanks for any hint (and yes, I've read help(Weibull) ;) > >Kaspar PflugshauptLook at the "Introduction to R", there is an example very close to your problem (section 11.7.2). In your case, the (minus) log-likelihood will be something like: fn <- function(p) sum(-log(dweibull(x, p[1], p[2]))) Then use nlm() as in the example. Emmanuel Paradis -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._