Skip to content

Commit 0516836

Browse files
committed
Copyediting, roxygen link styling, formatting
1 parent 93fac1a commit 0516836

5 files changed

+19
-19
lines changed

R/cdc_baseline_forecaster.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
#' This forecaster is meant to produce exactly the CDC Baseline used for
1313
#' [COVID19ForecastHub](https://covid19forecasthub.org)
1414
#'
15-
#' @param epi_data An [epiprocess::epi_df]
15+
#' @param epi_data An [`epiprocess::epi_df`]
1616
#' @param outcome A scalar character for the column name we wish to predict.
1717
#' @param args_list A list of additional arguments as created by the
1818
#' [cdc_baseline_args_list()] constructor function.
1919
#'
20-
#' @return A data frame of point and interval forecasts at for all
21-
#' aheads (unique horizons) for each unique combination of `key_vars`.
20+
#' @return A data frame of point and interval forecasts for all aheads (unique
21+
#' horizons) for each unique combination of `key_vars`.
2222
#' @export
2323
#'
2424
#' @examples

R/layer_cdc_flatline_quantiles.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
#' @inheritParams layer_residual_quantiles
2323
#' @param aheads Numeric vector of desired forecast horizons. These should be
2424
#' given in the "units of the training data". So, for example, for data
25-
#' typically observed daily (possibly with missing values), but
26-
#' with weekly forecast targets, you would use `c(7, 14, 21, 28)`. But with
27-
#' weekly data, you would use `1:4`.
25+
#' typically observed daily (possibly with missing values), but with weekly
26+
#' forecast targets, you would use `c(7, 14, 21, 28)`. But with weekly data,
27+
#' you would use `1:4`.
2828
#' @param quantile_levels Numeric vector of probabilities with values in (0,1)
2929
#' referring to the desired predictive intervals. The default is the standard
3030
#' set for the COVID Forecast Hub.
3131
#' @param nsims Positive integer. The number of draws from the empirical CDF.
32-
#' These samples are spaced evenly on the (0, 1) scale, F_X(x) resulting
33-
#' in linear interpolation on the X scale. This is achieved with
32+
#' These samples are spaced evenly on the (0, 1) scale, F_X(x) resulting in
33+
#' linear interpolation on the X scale. This is achieved with
3434
#' [stats::quantile()] Type 7 (the default for that function).
3535
#' @param symmetrize Logical. If `TRUE`, does two things: (i) forces the
3636
#' "empirical" CDF of residuals to be symmetric by pretending that for every
@@ -223,7 +223,7 @@ slather.layer_cdc_flatline_quantiles <-
223223
res <- dplyr::left_join(p, r, by = avail_grps) %>%
224224
dplyr::rowwise() %>%
225225
dplyr::mutate(
226-
.pred_distn_all = propogate_samples(
226+
.pred_distn_all = propagate_samples(
227227
.resid, .pred, object$quantile_levels,
228228
object$aheads, object$nsim, object$symmetrize, object$nonneg
229229
)
@@ -239,7 +239,7 @@ slather.layer_cdc_flatline_quantiles <-
239239
components
240240
}
241241

242-
propogate_samples <- function(
242+
propagate_samples <- function(
243243
r, p, quantile_levels, aheads, nsim, symmetrize, nonneg) {
244244
max_ahead <- max(aheads)
245245
if (symmetrize) {

man/cdc_baseline_forecaster.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/layer_cdc_flatline_quantiles.Rd

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-propogate_samples.R renamed to tests/testthat/test-propagate_samples.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
test_that("propogate_samples", {
1+
test_that("propagate_samples", {
22
r <- -30:50
33
p <- 40
44
quantiles <- 1:9 / 10

0 commit comments

Comments
 (0)