Method new()
Create a new NormalCS object.
Usage
NormalCS$new(
alternative = c("two.sided", "greater", "less"),
alpha = 0.05,
n_upper = 1000,
n_lower = 1,
weights = NULL,
lambdas = NULL,
skip_g_alpha = TRUE,
k_max = 1000
)
Arguments
alternative
Alternative / post-change mean space
two.sided: Two-sided test / change detection
greater: Alternative /post-change mean is greater than null / pre-change one
less: Alternative /post-change mean is less than null / pre-change one
alpha
Upper bound on the type 1 error of the confidence sequence.
n_upper
Upper bound of the target sample interval
n_lower
Lower bound of the target sample interval
weights
If not null, the input weights will be used to initialize the object
instead of n_upper
and n_lower
.
lambdas
If not null, the input lambdas will be used to initialize the object.
instead of n_upper
and n_lower
.
skip_g_alpha
If true, we do not compute g_alpha and use log(1/alpha) instead.
k_max
Positive integer to determine the maximum number of baselines.
Returns
A new NormalCS
object.
Print summary of Stcp object.
Method getAlpha()
Return the upper bound on the type 1 error
Usage
NormalCS$getAlpha()
Method getWeights()
Return weights of mixture of e-values / e-detectors.
Usage
NormalCS$getWeights()
Method getLambdas()
Return lambda parameters of mixture of e-values / e-detectors.
Usage
NormalCS$getLambdas()
Method computeWidth()
Compute the width of confidence interval at time n.
Usage
NormalCS$computeWidth(n)
Arguments
n
Positive time.
Method computeInterval()
Compute a vector of two end points of confidence interval
at time n
Usage
NormalCS$computeInterval(n, x_bar = 0)
Arguments
n
Positive time.
x_bar
The center of the confidence interval.