R/Sibyl-package.R

#' @importFrom graphics legend lines par axis mtext strwidth text points segments
#' @importFrom methods new show slot
#' @importFrom stats smooth.spline AIC BIC as.formula predict quantile formula median sd update.formula extractAIC resid integrate approx
#' @importFrom utils str tail
#' @import flexsurv
#' @import ggplot2
#' @import survival
#' @import azRMST
#' @import ReporteRs
NULL



##' Sibyl: The package fits parametric models to time-to-event data and
##' extrapolates these curves to larger surivival times.
##' @name Sibyl
##' @docType package
NULL


#' Example time to event data set for subjects trying to stop smoking
#' @details This data set is loosely based on an example
#' data frame from the asaur package
#' 
#' @format A data frame with the following columns:
#' \describe{
#'   \item{ID}{the unique subject id}
#'   \item{age}{age of the subject, in years}
#'   \item{race}{'white', 'black', 'hispanic' or 'other'}
#'   \item{grp}{'combination' or 'patchOnly'; the name of the treatment arm to which the subject was assigned}
#'   \item{sub.isMale}{ndicator for membership of the subgroup 'isMale'}
#'   \item{sub.isHeavySmoker}{indicator for membership of the subgroup 'isHeavySmoker'}
#'   \item{ttr}{time to relapse, in days}
#'   \item{ttr.cens}{indicator for relapse}
#'   \item{end.2}{additional endpoint}
#'   \item{cens.2}{indicator for additional endpoint}
#' } 
"sibylData"

##' Method to check whether an object contains data/models for a one arm clinical
##' trial
##' @rdname isSingleArm-methods
##' @name isSingleArm
##' @param object The object to check whether it contains the details for a
##' single arm trial
##' @return logical, whether the object was a single arm trial
##' @export
setGeneric( "isSingleArm", function(object)
  standardGeneric("isSingleArm"))


##' Method to extract the endpoint units for a given object
##' @rdname getEndpointUnits-methods
##' @name getEndpointUnits
##' @param object The object whose endpoint units is required
##' @return The units of the endpoints for the given object
##' @export
setGeneric( "getEndpointUnits", function(object)
  standardGeneric("getEndpointUnits"))
scientific-computing-solutions/sibyl documentation built on May 21, 2019, 8:40 a.m.