-
Notifications
You must be signed in to change notification settings - Fork 4
/
extendr-wrappers.R
40 lines (34 loc) · 1.52 KB
/
extendr-wrappers.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# 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)