sup_get_pval: Get p-value for supervised subsampling methods

View source: R/sup_get_pval.R

sup_get_pvalR Documentation

Get p-value for supervised subsampling methods

Description

On a single augmented subsample containing one observation per subject and (X_k+1, Y_k+1) = (X_new, Y_new), fit model mu.hat. Compute nonconformity scores R_i = |mu.hat(X_i) - Y_i|, i = 1, ..., k+1. The p-value is the proportion of R_i scores greater than or equal to R_k+1.

Usage

sup_get_pval(xy_sample, model_formula, X_new, Y_new)

Arguments

xy_sample

Data frame containing one observation per subject

model_formula

Linear model formula for mu.hat which will be fit on augmented sample

X_new

Covariate information for new observation

Y_new

Hypothetical outcome for new observation

Value

p-value for new observation (X_new, Y_new)


RobinMDunn/ConformalTwoLayer documentation built on March 22, 2022, 6:38 p.m.