[R] mle2(): logarithm of negative pdfs

Patrizio Frederic frederic.patrizio at gmail.com
Wed Jul 23 10:12:38 CEST 2008


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



More information about the R-help mailing list