Skip to content

Commit

Permalink
more on cluster fixed effects #124
Browse files Browse the repository at this point in the history
  • Loading branch information
s3alfisc committed Jun 25, 2023
1 parent fa6acd6 commit 91efcfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/boot_algo_fastnreliable.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ boot_algo_fastnreliable <- function(
G <- N_G_bootcluster <- length(unique(bootcluster[[1]]))
k <- length(R)



bootstrap_type_x <- paste0(substr(bootstrap_type, 1, 1), "x")
if(impose_null){
# WCR1x or WCR3x
Expand Down Expand Up @@ -132,7 +134,7 @@ boot_algo_fastnreliable <- function(
function(g) Matrix::t(X_list[[g]]) %*% y_list[[g]]
)


tXX <- Reduce("+", tXgXg) # crossprod(X)
tXy <- Reduce("+", tXgyg) # t(X) %*% y
tXXinv <- solve(tXX)
Expand Down Expand Up @@ -288,7 +290,7 @@ boot_algo_fastnreliable <- function(
score_diff <- scores_boot - scores_g_boot[g,]
delta_diff[g,] <-

(
as.vector(
(inv_tXX_tXgXg[[g]] %*% score_diff) - delta_b_star
)^2
}
Expand Down

0 comments on commit 91efcfe

Please sign in to comment.