Displaying 1 result from an estimated 1 matches for "neneglogpoisl".
Did you mean:
ipneglogpoisl
2006 Jun 02
2
Problem with mle
...f log of values in vector
SumLog <- function (x)
{
sum(log(x))
}
#-ln(L) with Poisson Likelihood estimator
NeglogPoisL <- function (obs, est)
{
sel <- est != 0
SumLogObs <- SumLog(obs[sel])
-sum( obs[sel] * log(est[sel]) - est[sel]- SumLogObs )
}
#-ln(L) for Negative Exponential
NENeglogPoisL <- function(a=0.2, rate=0.04)
{
NeglogPoisL( SumSeeds, a * dexp( X, rate) )
}
#-ln(L) for Weibull
WBNeglogPoisL <- function(a=1000000, shape=0.12, scale=1e+37)
{
NeglogPoisL( SumSeeds, a * dweibull(X, shape, scale) )
}
fit.WB <- mle(
WBNeglogPoisL
, start=list(a=1,...