Skip to content

Commit

Permalink
Bug fix when max preds was integer but by argument of seq_along was d…
Browse files Browse the repository at this point in the history
…ouble
  • Loading branch information
chrismainey committed Nov 14, 2019
1 parent c9029f5 commit 784dadf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/build_limits_lookup.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build_limits_lookup<-function(min_preds, max_preds, min_ratio, max_ratio, Poisso

# general limits + Tau2 limits table
set.seed(1)
number.seq <- c(seq(0.1, 10, 0.1), seq(11.0, max_preds, length.out = 1000))
number.seq <- c(seq(0.1, 10.0, 0.1), seq(11.0, as.numeric(max_preds), length.out = 1000))
dfCI <- data.frame(
number.seq,
ll95 = multiplier * ((qchisq(0.975, 2 * number.seq, lower.tail = FALSE) / 2) / number.seq),
Expand All @@ -42,7 +42,7 @@ build_limits_lookup<-function(min_preds, max_preds, min_ratio, max_ratio, Poisso
} else if (method == "SHMI") {
# general limits + Tau2 limits table
set.seed(1)
number.seq <- c(seq(0.1, 10, 0.1), seq(11.0, max_preds, length.out = 1000))
number.seq <- c(seq(0.1, 10.0, 0.1), seq(11.0, as.numeric(max_preds), length.out = 1000))
dfCI <- data.frame(
number.seq,
ll95 = multiplier * ((qchisq(0.975, 2 * number.seq, lower.tail = FALSE) / 2) / number.seq),
Expand Down

0 comments on commit 784dadf

Please sign in to comment.