diff --git a/NAMESPACE b/NAMESPACE index 5fa0b68b8..a03b623c0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,7 +11,6 @@ S3method(assert_epidist,default) S3method(assert_epidist,epidist_latent_model) S3method(assert_epidist,epidist_linelist_data) S3method(assert_epidist,epidist_naive_model) -S3method(epidist,default) S3method(epidist_family_model,default) S3method(epidist_family_model,epidist_latent_model) S3method(epidist_family_prior,default) diff --git a/NEWS.md b/NEWS.md index c7a319fdd..c4ddb509c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,9 @@ Development version of `epidist`. + +- Remove the default method for `epidist()`. See #473. + # epidist 0.1.0 This is the first minor release of `epidist` intended for early test users of the package. diff --git a/R/epidist.R b/R/epidist.R index 358e8f965..7241f570d 100644 --- a/R/epidist.R +++ b/R/epidist.R @@ -23,20 +23,9 @@ #' @param ... Additional arguments passed to `fn` method. #' @family fit #' @export -epidist <- function(data, formula, family, prior, fn, ...) { - UseMethod("epidist") -} - -#' Default method used for interface using `brms` -#' -#' @inheritParams epidist -#' @rdname epidist.default -#' @method epidist default -#' @family fit -#' @export -epidist.default <- function(data, formula = mu ~ 1, - family = lognormal(), prior = NULL, - fn = brms::brm, ...) { +epidist <- function(data, formula = mu ~ 1, + family = lognormal(), prior = NULL, + fn = brms::brm, ...) { assert_epidist(data) epidist_family <- epidist_family(data, family) epidist_formula <- epidist_formula( diff --git a/man/epidist.Rd b/man/epidist.Rd index 1372c522f..27e754a90 100644 --- a/man/epidist.Rd +++ b/man/epidist.Rd @@ -4,7 +4,14 @@ \alias{epidist} \title{Fit epidemiological delay distributions using a \code{brms} interface} \usage{ -epidist(data, formula, family, prior, fn, ...) +epidist( + data, + formula = mu ~ 1, + family = lognormal(), + prior = NULL, + fn = brms::brm, + ... +) } \arguments{ \item{data}{An object with class corresponding to an implemented model.} @@ -37,8 +44,4 @@ These two later options may be useful for model debugging and extensions.} \description{ Fit epidemiological delay distributions using a \code{brms} interface } -\seealso{ -Other fit: -\code{\link{epidist.default}()} -} \concept{fit} diff --git a/man/epidist.default.Rd b/man/epidist.default.Rd deleted file mode 100644 index 5c85cff0b..000000000 --- a/man/epidist.default.Rd +++ /dev/null @@ -1,51 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/epidist.R -\name{epidist.default} -\alias{epidist.default} -\title{Default method used for interface using \code{brms}} -\usage{ -\method{epidist}{default}( - data, - formula = mu ~ 1, - family = lognormal(), - prior = NULL, - fn = brms::brm, - ... -) -} -\arguments{ -\item{data}{An object with class corresponding to an implemented model.} - -\item{formula}{An object of class \link[stats:formula]{stats::formula} or \link[brms:brmsformula]{brms::brmsformula} -(or one that can be coerced to those classes). A symbolic description of the -model to be fitted. A formula must be provided for the distributional -parameter \code{mu}, and may optionally be provided for other distributional -parameters.} - -\item{family}{A description of the response distribution and link function to -be used in the model. Every family function has a link argument allowing -users to specify the link function to be applied on the response variable. -If not specified, default links are used. For details of all supported -families see \code{\link[=brmsfamily]{brmsfamily()}}. Commonly used, such as \code{\link[=lognormal]{lognormal()}}, are also -reexported as part of \code{epidist}.} - -\item{prior}{One or more \code{brmsprior} objects created by \code{\link[brms:set_prior]{brms::set_prior()}} -or related functions. These priors are passed to \code{\link[=epidist_prior]{epidist_prior()}} in the -\code{prior} argument.} - -\item{fn}{The internal function to be called. By default this is -\code{\link[brms:brm]{brms::brm()}} which performs inference for the specified model. Other options -are \code{\link[brms:stancode]{brms::make_stancode()}} which returns the Stan code for the specified -model, or \code{\link[brms:standata]{brms::make_standata()}} which returns the data passed to Stan. -These two later options may be useful for model debugging and extensions.} - -\item{...}{Additional arguments passed to \code{fn} method.} -} -\description{ -Default method used for interface using \code{brms} -} -\seealso{ -Other fit: -\code{\link{epidist}()} -} -\concept{fit}