Running examples in ‘tipmap-Ex.R’ failed
The error most likely occurred in:

> ### Name: createStochasticWeightPosterior
> ### Title: Average over multiple posteriors created using different
> ###   informative component weights.
> ### Aliases: createStochasticWeightPosterior
> 
> ### ** Examples
> 
> 
> newTrialData <- createNewTrialData(
+   nTotal = 30,
+   treatmentEffectEstimate = 1.27, standardError = 0.95
+ )
> 
> mapPrior <- loadTipmapData("tipmapPrior.rds")
> 
> expertWeights <- rbind(
+   c(0, 0, 0, 0, 2, 3, 3, 2, 0, 0),
+   c(0, 0, 0, 1, 2, 4, 2, 1, 0, 0),
+   c(0, 0, 0, 2, 2, 2, 2, 2, 0, 0)
+ )
> 
> createStochasticWeightPosterior(
+   mapPrior = mapPrior, newTrialData = newTrialData,
+   weights = drawExpertWeightSample(expertWeights, n = 500), sigma = 12
+ )
Error in SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1) : 
  probabilities must be between 0 and 1
Calls: createStochasticWeightPosterior ... fitExpertBetaDistributions -> <Anonymous> -> .f -> <Anonymous>
Execution halted
Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
   8.         └─SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1)
  ── Error (test-getExpertWeightSummary.R:2:3): expert weight summary works ──────
  Error in `SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1)`: probabilities must be between 0 and 1
  Backtrace:
      ▆
   1. └─tipmap::getExpertWeightSummary(...) at test-getExpertWeightSummary.R:2:2
   2.   └─tipmap::drawExpertWeightSample(expertWeights, n = n, weights = weights)
   3.     └─tipmap::fitExpertBetaDistributions(expertWeights)
   4.       └─purrr::map(...)
   5.         └─tipmap (local) .f(.x[[i]], ...)
   6.           └─SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1)
  
  [ FAIL 2 | WARN 1 | SKIP 0 | PASS 34 ]
  Error: Test failures
  Execution halted
Running examples in ‘tipmap-Ex.R’ failed
The error most likely occurred in:

> ### Name: createStochasticWeightPosterior
> ### Title: Average over multiple posteriors created using different
> ###   informative component weights.
> ### Aliases: createStochasticWeightPosterior
> 
> ### ** Examples
> 
> 
> newTrialData <- createNewTrialData(
+   nTotal = 30,
+   treatmentEffectEstimate = 1.27, standardError = 0.95
+ )
> 
> mapPrior <- loadTipmapData("tipmapPrior.rds")
> 
> expertWeights <- rbind(
+   c(0, 0, 0, 0, 2, 3, 3, 2, 0, 0),
+   c(0, 0, 0, 1, 2, 4, 2, 1, 0, 0),
+   c(0, 0, 0, 2, 2, 2, 2, 2, 0, 0)
+ )
> 
> createStochasticWeightPosterior(
+   mapPrior = mapPrior, newTrialData = newTrialData,
+   weights = drawExpertWeightSample(expertWeights, n = 500), sigma = 12
+ )
Error in SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1) : 
  probabilities must be between 0 and 1
Calls: createStochasticWeightPosterior ... fitExpertBetaDistributions -> <Anonymous> -> .f -> <Anonymous>
Execution halted
Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
   8.         └─SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1)
  ── Error (test-getExpertWeightSummary.R:2:3): expert weight summary works ──────
  Error in `SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1)`: probabilities must be between 0 and 1
  Backtrace:
      ▆
   1. └─tipmap::getExpertWeightSummary(...) at test-getExpertWeightSummary.R:2:2
   2.   └─tipmap::drawExpertWeightSample(expertWeights, n = n, weights = weights)
   3.     └─tipmap::fitExpertBetaDistributions(expertWeights)
   4.       └─purrr::map(...)
   5.         └─tipmap (local) .f(.x[[i]], ...)
   6.           └─SHELF::fitdist(vals = .x$w, probs = .x$cumprobs, lower = 0, upper = 1)
  
  [ FAIL 2 | WARN 1 | SKIP 0 | PASS 34 ]
  Error: Test failures
  Execution halted