Skip to content

Commit 4913e4f

Browse files
committed
clean
1 parent e9033c0 commit 4913e4f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ Suggests:
3232
shinyjs,
3333
shinythemes,
3434
reshape,
35-
testthat (>= 3.0.0),
36-
magrittr,
37-
tidyverse,
38-
devtools,
39-
vdiffr
35+
testthat (>= 3.0.0)
4036
Imports:
4137
ggplot2,
4238
checkmate,

R/dbetabinom.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ h_getBetamixPost <- function(x, n, par, weights) {
9595
lbeta(a = postPar[, 1], b = postPar[, 2]) - lbeta(a = par[, 1], b = par[, 2])
9696
)
9797
# We compute the updated weights of the posterior
98-
postWeights <- weights * tmp / sum(weights * tmp)
98+
# postWeights <- weights * tmp / sum(weights * tmp)
99+
postWeights <- exp(log(weights) + log(tmp)) - sum(weights * tmp)
99100
assert_numeric(postWeights)
100101
list(
101102
par = postPar,

0 commit comments

Comments
 (0)