Skip to content

Commit

Permalink
helper runs
Browse files Browse the repository at this point in the history
  • Loading branch information
audreyyeoCH committed Dec 8, 2023
1 parent 192c565 commit 99946fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions R/predprobDist.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ h_predprobdist <- function(NmaxControl,
nS,
xS,
parS,
parE,
weights,
weightsS,
x,
mE,
Expand Down
2 changes: 2 additions & 0 deletions man/h_predprobdist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion tests/testthat/test-predprobDist.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,20 @@ test_that("predprobdist gives correct list", {
test_that("predprobdist gives correct predictive probability", {
mE <- 17
parE <- rbind(c(1, 1), c(50, 10))
thetaT <- 0.9
result <- h_predprobdist(
NmaxControl = 20,
Nmax = 40,
nS = 10,
xS = 5,
parE = rbind(c(1, 1), c(50, 10)),
parS = rbind(c(1, 1), c(20, 40)),
weights = c(2, 1),
weightsS = c(2, 1),
x = 16,
mE = 17,
density_y = dbetabinomMix(x = 0:17, m = 23, par = rbind(c(1, 1), c(50, 10)), weights = c(0.5, 0.5)),
delta = 0.1, relativeDelta = FALSE, mE = mE
delta = 0.1, relativeDelta = FALSE
)
expect_equal(result$result, 0.5426927, tolerance = 1e-4)
})
Expand Down

0 comments on commit 99946fd

Please sign in to comment.