Learn R Programming

ISS (version 1.0.0)

get_p_subGaussian_NM: get_p_subGaussian_NM

Description

Calculate the p-value in Definition 18 of MRCS2023;textualISS.

Usage

get_p_subGaussian_NM(X, y, x0, sigma2, tau, rho = 0.5)

Value

A single numeric value in (0, 1].

Arguments

X

a numeric matrix specifying the covariates.

y

a numeric vector with length(y) == nrow(X) specifying the responses.

x0

a numeric vector specifying the point of interest, such that length(x0) == ncol(X).

sigma2

a single positive numeric value specifying the variance parameter.

tau

a single numeric value specifying the threshold of interest.

rho

a single positive numeric value serving as hyperparameter.

References

MRCS2023ISS

Examples

Run this code
set.seed(123)
n <- 100
d <- 2
X <- matrix(runif(d * n), ncol = d)
eta <- function(x) sum(x)
y <- apply(X, MARGIN = 1, FUN = eta) + rnorm(n, sd = 0.5)
get_p_subGaussian_NM(X, y, x0 = c(1, 1), sigma2 = 0.25, tau = 3)
get_p_subGaussian_NM(X, y, x0 = c(1, 1), sigma2 = 0.25, tau = 1)
get_p_subGaussian_NM(X, y, x0 = c(1, 1), sigma2 = 0.25, tau = 1, rho = 2)


Run the code above in your browser using DataLab