Displaying 1 result from an estimated 1 matches for "nll1".
Did you mean:
nll
2012 Oct 11
2
model selection with spg and AIC (or, convert list to fitted model object)
...3L), n3 = c(1L, 0L, 1L, 0L,
0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L)), .Names = c("tv",
"n1", "n2", "n3"), row.names = c(NA, -20L), class =
"data.frame")
# Negative log likelihood functions
NLL1 <- function(par, y){
p1 <- par[1]
p2 <- par[2]
mu1 <- par[3]
mu2 <- par[4]
n1 <- y$n1
n2 <- y$n2
n3 <- y$n3
t <- y$tv
P1 <- (p1*((-1 + exp(sqrt((mu1 + mu2 + p1 + p2)^2 -
4*(mu2*p1 + mu1*(mu2 + p2)))*t))*((-mu2)*(mu2 - p1 + p2) +
mu1...