SGLR_CI: GLR-like and Discrete Mixture CS for general sub-psi class

Description Usage Arguments Value Examples

View source: R/stitching_mixture_method.R

Description

SGLR_CI is used to compute R functions which compute bounds of GLR-like, stitching and discrete mixture confidence sequences for general sub-psi class designed to a finite target time interval. For the additive sub-psi class, we recommend to use SGLR_CI_additive for more efficient computations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
SGLR_CI(
  alpha,
  nmax = NULL,
  nmin = 1L,
  d = NULL,
  m_upper = 1000L,
  breg = function(mu_1, mu_0) {     (mu_1 - mu_0)^2/2 },
  breg_pos_inv = function(d, mu_0) {     mu_0 + sqrt(2 * d) },
  breg_neg_inv = function(d, mu_0) {     mu_0 - sqrt(2 * d) },
  breg_derv = function(z, mu_0) {     z - mu_0 },
  mu_lower = NULL,
  mu_upper = NULL,
  grid_by = NULL,
  n_0 = 1L
)

Arguments

alpha

An upper bound on the boundary crossing probability (positive numeric in [1e-16,0.5]).

nmax

Upper bound of the target time interval. If both nmax and d are provided, nmax will be ignored. (default = NULL)

nmin

Lower bound of the target time interval. (default = 1L)

d

Bregman divergence between the null and alternative spaces. Either d or nmax must be specified (default = NULL).

m_upper

Upper bound on the grid-search for m (default = 1e+3L).

breg

R function of D(μ_1, μ_0) which takes mu_1 and mu_0 as inputs (Default: (mu_1 - mu_0)^2 / 2).

breg_pos_inv

R function of inverse of the mapping z \mapsto D(z, μ_0):= d on z > μ_0 which takes d and mu_0 as inputs (Default: μ_0+√{2d}).

breg_neg_inv

R function of inverse of the mapping z \mapsto D(z, μ_0):= d on z < μ_0 which takes d and mu_0 as inputs (Default: μ_0 - √{2d}).

breg_derv

R function of \nabla_z D(z, μ_0) which takes z and mu_0 as inputs (Default: z - μ_0).

mu_lower

Lower bound of the mean parameter space (default = NULL).

mu_upper

Upper bound of the mean parameter space (default = NULL).

grid_by

The size of grid-window of mean space. Default is NULL.

n_0

Lower bound of the sample size on which test statistics and CI will be computed (default = 1L).

Value

A list of R functions for GLR-like, stitching and discrete mixture bound which takes sample mean x_bar and sample size n as the input and return the anytime-valid confidence interval at n. The list also contains related quantities to compute these bounds. See ADD_CITE for detailed explanations of these quantities.

GLR_like_fn

R function for the GLR-like bound.

dis_mix_fn

R function for the discrete mixture bound.

log_GLR_like_stat_generator

R function to generate log of GLR-like statistic minus the threshold.

log_dis_mart_generator

R function to generate log of GLR-like statistic minus the threshold.

alpha

alpha valud used to construct GLR-like and discrete mixture bound functions

g

The boundary value for initial nmin and nmax.

eta

The eta value used to construct underlying martingales

K

The number of LR-like martingales used to construct bounds for n ≥q n_{\min} part.

mu_range

Minimum and maximum of the mean parater space.

grid_by

The size of grid-window of mean space.

Examples

1
2
SGLR_CI(0.025, 1e+5)
SGLR_CI(0.025, 1e+6, 1e+2)

shinjaehyeok/SGLRT_paper documentation built on Oct. 25, 2020, 8:11 a.m.