diff --git a/R/DAISIE_loglik_high_lambda.R b/R/DAISIE_loglik_high_lambda.R index 25f50161..a0500aed 100644 --- a/R/DAISIE_loglik_high_lambda.R +++ b/R/DAISIE_loglik_high_lambda.R @@ -11,7 +11,7 @@ DAISIE_loglik_high_lambda <- function(pars1, brts, stac) { if (stac == 0) { out <- -gam * brts[1] } - if (stac == 2) { + if (stac == 2 | stac == 6) { out <- -gam * brtsdiff[1] + log(gam) * (stac == 2) + log(1 - exp(-gam * brtsdiff[2])) * (stac == 6) + @@ -23,12 +23,9 @@ DAISIE_loglik_high_lambda <- function(pars1, brts, stac) { - (N - 1) * log(N - 1) + - mu / (N - 1) * sum((1:N) * (0:(N - 1)) * brtsdiff[(2 + (stac == 6)):(N + 1 + (stac == 6))]) } - if (stac == 7) { - out <- log(1 - exp(-gamma * brtsdiff[1])) - } if (stac == 1 | stac == 3 | stac == 4 | stac == 5 | stac >= 7) { out <- -Inf } - #stac 6 still to be done. + #Stac 6 to be checked return(out) }