calgsp1 {MultiGroupSequential}R Documentation

Calculate group-sequential p-values for one hypothesis

Description

calgsp1() calculates the group-sequential p-values for one hypothesis.

Usage

calgsp1(
  sx = qnorm(1 - c(0.03, 0.04, 0.01)),
  scrit = qnorm(1 - c(0.01, 0.02, 0.025)),
  salpha = c(0.01, 0.02, 0.025),
  smatrix = diag(3),
  sided = 1
)

Arguments

sx

Numeric vector of test statistics, assumed to be multivariate normal with variance 1 and correlation matrix given by smatrix.

scrit

Numeric vector of sequece of critical values for the test statistics in sx. It should be computed beforehand. Must have the same length as sx.

salpha

Numeric vector of cumulative alpha levels for the test statistics in sx. Must have the same length as sx.

smatrix

Matrix with the correlation matrix of the test statistics sx.

sided

Integer scalar indicating the side of the test:

  • -1: Reject if test statistic is smaller than or equal to the critical value (one-sided)

  • 1: Reject if test statistic is greater or equal to the critical value (one-sided)

  • 0: Reject if the absolute value of the test statistic is greater than the critical value (two-sided)

Value

List containing the group-sequential p-values.

Author(s)

Xiaodong Luo

Examples

calgsp1(
  sx = qnorm(1 - c(0.03, 0.04, 0.01)),
  scrit = qnorm(1 - c(0.01, 0.02, 0.025)),
  salpha = c(0.01, 0.02, 0.025),
  smatrix = diag(3),
  sided = 1
)

[Package MultiGroupSequential version 1.1.0 Index]