Skip to content

Commit

Permalink
Update examples and vignette such that examples don't have any more i…
Browse files Browse the repository at this point in the history
…nstances where the lower bound of an interval is higher than an upper bound
  • Loading branch information
nikosbosse committed Nov 4, 2023
1 parent 4beb3a8 commit 6b6a8c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R/metrics-range.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#' interval_range <- rep(90, 30)
#' alpha <- (100 - interval_range) / 100
#' lower <- qnorm(alpha / 2, rnorm(30, mean = 1:30))
#' upper <- qnorm((1 - alpha / 2), rnorm(30, mean = 1:30))
#' upper <- qnorm((1 - alpha / 2), rnorm(30, mean = 11:40))
#'
#' interval_score(
#' observed = observed,
Expand All @@ -73,7 +73,7 @@
#' )
#'
#' # gives a warning, as the interval_range should likely be 50 instead of 0.5
#' interval_score(observed = 4, upper = 2, lower = 8, interval_range = 0.5)
#' interval_score(observed = 4, upper = 8, lower = 2, interval_range = 0.5)
#'
#' # example with missing values and separate results
#' interval_score(
Expand Down
4 changes: 2 additions & 2 deletions man/interval_score.Rd

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

2 changes: 1 addition & 1 deletion vignettes/scoring-forecasts-directly.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ observed <- rnorm(30, mean = 1:30)
interval_range <- 90
alpha <- (100 - interval_range) / 100
lower <- qnorm(alpha / 2, rnorm(30, mean = 1:30))
upper <- qnorm((1 - alpha / 2), rnorm(30, mean = 1:30))
upper <- qnorm((1 - alpha / 2), rnorm(30, mean = 11:40))
interval_score(
observed = observed,
Expand Down

0 comments on commit 6b6a8c2

Please sign in to comment.