Skip to content

Commit

Permalink
faster
Browse files Browse the repository at this point in the history
  • Loading branch information
tappek committed Jan 15, 2025
1 parent f46844f commit 170422a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/tool_vcovG.R
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ vcovBK.plm <- function(x, type = c("HC0", "HC1", "HC2", "HC3", "HC4"),
ut <- uhat[tind[[i]]]
tpos <- seq.len.t[unlabs %in% tlab[[i]]]
## put non-diag elements to 0 if diagonal=TRUE
tres[tpos, tpos, i] <- if(diagonal) diag(diag(ut %o% ut)) else ut %o% ut
tres[tpos, tpos, i] <- if(diagonal) diag(diag(tcrossprod(ut))) else tcrossprod(ut)
}

## average over all omega blocks, removing NAs (apply preserving
Expand Down

0 comments on commit 170422a

Please sign in to comment.