Skip to content

Commit f074054

Browse files
package
1 parent 6cbfff8 commit f074054

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

R/est_s_t_y-methods.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,16 @@ print_effects <- function(object_t1, object_t0, rounding=3, ...){
8181
res_out_diff$Estimates[which(res_out_diff$type=="RTCE")] <- round(object_t1$est_trunc_R1[1]-object_t0$est_trunc_R1[1], rounding)
8282

8383
IF_R1_diff <- t1_IF_R1_mat - object_t0$IF_trunc_R1[[1]]
84-
var_R1_temp <- vapply(fold_idx, function(id) colVars(IF_R1_diff[id, ]), numeric(n_gamma1))
84+
var_R1_temp <- vapply(fold_idx, function(id) matrixStats::colVars(IF_R1_diff[id, ]), numeric(n_gamma1))
8585
res_out_diff$Var[which(res_out_diff$Type=="RTCE")] <- round(rowMeans(var_R1_temp)[1]*scale_n, rounding)
8686

8787
for (g_0 in seq_along(object_t0$gamma)) {
8888

8989
IF_diff <- t1_IF_mat - object_t0$IF_trunc[[g_0]]
9090
IF_R0_diff <- t1_IF_R0_mat - object_t0$IF_trunc_R0[[g_0]]
9191

92-
var_temp <- vapply(fold_idx, function(id) colVars(IF_diff[id, ]), numeric(n_gamma1))
93-
var_R0_temp <- vapply(fold_idx, function(id) colVars(IF_R0_diff[id, ]), numeric(n_gamma1))
92+
var_temp <- vapply(fold_idx, function(id) matrixStats::colVars(IF_diff[id, ]), numeric(n_gamma1))
93+
var_R0_temp <- vapply(fold_idx, function(id) matrixStats::colVars(IF_R0_diff[id, ]), numeric(n_gamma1))
9494

9595
indx_CCCE <- which(res_out_diff$gamma0==object_t0$gamma[g_0]&res_out_diff$Type=="CCCE")
9696
res_out_diff$Estimates[indx_CCCE] <- round(object_t1$est_trunc-object_t0$est_trunc, rounding)
@@ -112,16 +112,16 @@ print_effects <- function(object_t1, object_t0, rounding=3, ...){
112112
res_out_diff$Estimates[which(res_out_diff$Type=="RTCE")] <- round(object_t1$est_R1[1]-object_t0$est_R1[1], rounding)
113113

114114
IF_R1_diff <- t1_IF_R1_mat - object_t0$IF_R1[[1]]
115-
var_R1_temp <- vapply(fold_idx, function(id) colVars(IF_R1_diff[id, ]), numeric(n_gamma1))
115+
var_R1_temp <- vapply(fold_idx, function(id) matrixStats::colVars(IF_R1_diff[id, ]), numeric(n_gamma1))
116116
res_out_diff$Var[which(res_out_diff$Type=="RTCE")] <- round(rowMeans(var_R1_temp)[1]*scale_n, rounding)
117117

118118
for (g_0 in seq_along(object_t0$gamma)) {
119119

120120
IF_diff <- t1_IF_mat - object_t0$IF[[g_0]]
121121
IF_R0_diff <- t1_IF_R0_mat - object_t0$IF_R0[[g_0]]
122122

123-
var_temp <- vapply(fold_idx, function(id) colVars(IF_diff[id, ]), numeric(n_gamma1))
124-
var_R0_temp <- vapply(fold_idx, function(id) colVars(IF_R0_diff[id, ]), numeric(n_gamma1))
123+
var_temp <- vapply(fold_idx, function(id) matrixStats::colVars(IF_diff[id, ]), numeric(n_gamma1))
124+
var_R0_temp <- vapply(fold_idx, function(id) matrixStats::colVars(IF_R0_diff[id, ]), numeric(n_gamma1))
125125

126126
indx_CCCE <- which(res_out_diff$gamma0==object_t0$gamma[g_0]&res_out_diff$Type=="CCCE")
127127
res_out_diff$Estimates[indx_CCCE] <- round(object_t1$est-object_t0$est, rounding)

0 commit comments

Comments
 (0)