search for: ddoublepois

Displaying 1 result from an estimated 1 matches for "ddoublepois".

2018 May 19
0
Lower bound and upper bound in maximum likelihood
...ood by double poisson density function from rmutil: logl3 <- function(par) { h.new <- vector() a0 <- par[1] a1 <- par[2] b1 <- par[3] g1 <- par[4] for (i in 2:n) { h.new[i] = a0 + a1 * nu[i-1] + b1 * h.new[i-1] } -sum(ddoublepois(nu, m=h.new[2:n], s=g1,log=TRUE)) } nlminb(start = c(0.01,0.01,0.01,0.01), lower = 1e-3, upper = Inf, logl3)$par But there is error. >Error in if (any(m <= 0)) stop("m must be positive") : >missing value where TRUE/FALSE needed So I further check the maximum likeliho...