unsup_repeated_subsample: Unsupervised repeated subsampling method

View source: R/unsup_repeated_subsample.R

unsup_repeated_subsampleR Documentation

Unsupervised repeated subsampling method

Description

Construct n_resamp subsamples of one observation per subject. On a subsample b containing 1 observation from each of the k subjects, the p-value at u is inf{alpha : u not in [Y^b_(r), Y^b_(s)]}, where r = floor((k+1)(alpha/2)) and s = ceiling((k+1)(1-alpha/2)). The p-value is 1 if u is in [Y^b_(floor((k+1)/2)), Y^b_(ceiling((k+1)/2))]. The repeated subsampling prediction interval is the set of all u with average p-values >= alpha.

Usage

unsup_repeated_subsample(Y, alpha, k_val, n_resamp, new_Y = NULL)

Arguments

Y

List containing data of all subjects. Each item in the list is a vector with one subject's observations.

alpha

Significance level

k_val

Number of subjects

n_resamp

Number of repeated subsamples

new_Y

Observation on new subject

Value

List containing prediction interval size, prediction interval lower bound, prediction interval upper bound, and whether new observation is contained inside prediction interval.


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