[R] Estimating Weibull Distribution Parameters - very basic question

Kaspar Pflugshaupt pflugshaupt at geobot.umnw.ethz.ch
Tue Aug 28 16:56:08 CEST 2001


On Tuesday 28 August 2001 16:10, Peter Dalgaard BSA wrote:                    
                                                                        

> 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...

[sound of slapping hand against forehead] 

I feel like I've been blind :-)

Thanks a lot for the quick answer!

Guess I'll have to dig deeper into optim() (never used it before, so the 
possibility didn't occur to me)


Kaspar


-- 

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list