powered by
calgsp1() calculates the group-sequential p-values for one hypothesis.
calgsp1()
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 )
List containing the group-sequential p-values.
Numeric vector of test statistics, assumed to be multivariate normal with variance 1 and correlation matrix given by smatrix.
smatrix
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.
sx
Numeric vector of cumulative alpha levels for the test statistics in sx. Must have the same length as sx.
Matrix with the correlation matrix of the test statistics sx.
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
1: Reject if test statistic is greater or equal to the critical value (one-sided)
1
0: Reject if the absolute value of the test statistic is greater than the critical value (two-sided)
0
Xiaodong Luo
Run the code above in your browser using DataLab