[R] Problem with MASS::fitdistr().
Abby Spurdle
@purd|e@@ @end|ng |rom gm@||@com
Sun Apr 26 23:31:20 CEST 2020
> Dear Ms. Spurdle
I usually refer to myself as "He".
(But then, that's not the whole story...)
I'm not an expert on maximum likelihood approaches.
So, I apologize if the following suggestion is a poor one.
Does your likelihood function have a limit, as alpha approaches zero (say zero)?
If so, the limit of the log-likelihood would be -Inf, would it not.
You could create a function representing the likelihood or
log-likelihood by wrapping your density function.
The function could allow alpha/beta values equal to or below zero, and
return the limit.
This is mathematically incorrect, but may be sufficient for
permissible estimates of the second-order partial derivatives.
Depending on the shape of the likelihood function these
pseudo-likelihoods maybe able to be improved...?
You could then do a small modification on the source code for
MASS::fitdistr, such that the user specifies the likelihood function
or log-likelihood function, rather than the density...
The fitdistr function is relatively complex, however, you would only
need to modify a couple of lines, the lines that create the fn
function...
More information about the R-help
mailing list