Re: [R] mle2(): logarithm of negative pdfs

From: Patrizio Frederic <frederic.patrizio_at_gmail.com>
Date: Wed, 23 Jul 2008 10:12:38 +0200

this is an off-topic, of course!
by definition, pdf MUST BE POSITIVE and log function is defined ONLY for positive values.
check your pdf code and find out the errors.

regards

Patrizio Frederic

+-------------------------------------------------
| Patrizio Frederic
| Research associate in Statistics,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel:  +39 059 205 6727

| fax: +39 059 205 6947
| mail: patrizio.frederic_at_unimore.it
+-------------------------------------------------


2008/7/23 Zornitsa Luleva <zornitsa.luleva_at_gmail.com>:
> Hi,
>
> In order to use the mle2-function, one has to define the likelihood function
> itself. As we know, the likelihood function is a sum of the logarithm of
> probability density functions (pdf). I have implemented myself the pdfs
> that I am using. My problem is, that the pdfs values are negative and I
> cann't take the logarithm of them in the log-likelihood function.
>
> So how can one take the logarithm of negative values of the pdfs?
>
> Thanks a lot for your advice!
>
> Zoe
>
> [[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.
>



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 Wed 23 Jul 2008 - 08:28:12 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 Wed 23 Jul 2008 - 09:32:11 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