Skip to content

Commit 809ed32

Browse files
committed
rename t_ij --> t
1 parent 67986b3 commit 809ed32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/gs_cp_npe.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ gs_cp_npe <- function(theta = NULL,
7373
# ----------------------------------------- #
7474
# calculate conditional power under theta #
7575
# ----------------------------------------- #
76-
t_ij <- info[2] / info[1]
77-
numerator1 <- b - a * sqrt(t_ij)
78-
numerator2 <- theta[2] * sqrt(info[2]) - theta[1] * sqrt(t_ij * info[1])
79-
denominator <- sqrt(1 - t_ij)
76+
t <- info[2] / info[1]
77+
numerator1 <- b - a * sqrt(t)
78+
numerator2 <- theta[2] * sqrt(info[2]) - theta[1] * sqrt(t * info[1])
79+
denominator <- sqrt(1 - t)
8080
conditional_power <- pnorm((numerator1 - numerator2) / denominator, lower.tail = FALSE)
8181

8282
return(conditional_power)

0 commit comments

Comments
 (0)