Skip to content

Commit

Permalink
edits loglik_high_lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
rsetienne committed Jul 15, 2024
1 parent 1f213ad commit 47c29e0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions R/DAISIE_loglik_high_lambda.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) +
Expand All @@ -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)
}

0 comments on commit 47c29e0

Please sign in to comment.