View source: R/get_p_classification.R
get_p_classification | R Documentation |
Calculate the p-value in Definition 21 of \insertCiteMRCS2023;textualISS.
get_p_classification(X, y, x0, tau)
X |
a numeric matrix specifying the covariates. |
y |
a numeric vector with |
x0 |
a numeric vector specifying the point of interest, such that
|
tau |
a single numeric value in [0,1) specifying the threshold of interest. |
A single numeric value in (0, 1].
MRCS2023ISS
set.seed(123)
n <- 100
d <- 2
X <- matrix(runif(d * n), ncol = d)
eta <- function(x) sum(x)
X_eta <- apply(X, MARGIN = 1, FUN = function(x) 1 / (1 + exp(-eta(x))))
y <- as.numeric(runif(n) < X_eta)
get_p_classification(X, y, x0 = c(1, 1), tau = 0.6)
get_p_classification(X, y, x0 = c(1, 1), tau = 0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.