R/extendr-wrappers.R

Defines functions crmht2 crmht crmh crmh_xo

Documented in crmh crmht crmht2 crmh_xo

# Generated by extendr: Do not edit by hand
#
# This file was created with the following call:
#   .Call("wrap__make_precautionary_wrappers", use_symbols = TRUE, package_name = "precautionary")

#' @docType package
#' @usage NULL
#' @useDynLib precautionary, .registration = TRUE
NULL

#' Rust implementation of `dfcrm::crmh*` integrands for w==1 case
#'
#' @param a Numeric vector of evaluation points
#' @param ln_x A numeric vector of dose-wise prior log-probabilities of toxicity
#' @param tox A numeric vector; a dose-wise tally of toxicities
#' @param nos A numeric vector; a dose-wise tally of non-toxicities
#' @param s Scalar scale factor
#' @param b Order of moment to calculate (0, 1 or 2)
#' @export
crmh_xo <- function(a, ln_x, tox, nos, s, b) .Call(wrap__crmh_xo, a, ln_x, tox, nos, s, b)

#' Rust implementation of `dfcrm::crmh*` integrands
#'
#' @param a Numeric vector of evaluation points
#' @param ln_x A numeric vector of dose-wise prior log-probabilities of toxicity
#' @param w Patient-wise weights (used for TITE CRM), also encoding toxicity
#' by `w[i] == 0.0`.
#' @param s Scalar scale factor
#' @describeIn crmh Posterior for 1-parameter empiric (aka 'power') model
#' @export
crmh <- function(a, ln_x, w, s) .Call(wrap__crmh, a, ln_x, w, s)

#' @describeIn crmh Integrand for 1st moment of empiric posterior
#' @export
crmht <- function(a, ln_x, w, s) .Call(wrap__crmht, a, ln_x, w, s)

#' @describeIn crmh Integrand for 2nd moment of empiric posterior
#' @export
crmht2 <- function(a, ln_x, w, s) .Call(wrap__crmht2, a, ln_x, w, s)

Try the precautionary package in your browser

Any scripts or data that you put into this service are public.

precautionary documentation built on Aug. 9, 2021, 9:14 a.m.