Re: [R] Weibull

From: Cleber Nogueira Borges <klebyn_at_yahoo.com.br>
Date: Tue, 15 Apr 2008 16:15:15 -0300

Ben Bolker wrote:
> Matthew B. <mtthw.bt <at> gmail.com> writes:
>
>
>> Dear R users,
>>
>> This is a basic question.
>>
>> I want to fit a Weibull distribution. fitdistr(data, "weibull") works and it
>> is a maximum likelihood fitting. Is it a good method ? Or is it better to
>> write a function for the log-likelihood and the gradient and to use a
>> numerical routine ?
>>
>> Fitdistr works for uncensored data, but what can I use for censored (and
>> uncensored) data ?
>>
>>
>
> fitdistr() is just fine for simple data.
> for censored data you will indeed have to make up
> your own negative log-likelihood function, using
> dweibull() for uncensored data and pweibull() for
> censored data. You don't need to write a function
> for the gradient (R will compute derivatives by
> finite differences automatically) unless you are
> very concerned with speed and stability.
> You shouldn't need anything beyond pweibull,
> dweibull, and optim (or mle in the stats4 package).
>
> Ben Bolker
> ______________________________________________
>
>
>
Do You have a example for how to make this??

TIA Cleber



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. Received on Tue 15 Apr 2008 - 19:19:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Apr 2008 - 19:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive