From eb24bf7fb8af2188202f4117f4f796ab2eacdcca Mon Sep 17 00:00:00 2001 From: tappek <77916431+tappek@users.noreply.github.com> Date: Sat, 6 Jul 2024 15:09:48 +0200 Subject: [PATCH] pvcm: substitute base R#s split with faster collapse::rsplit --- R/est_vcm.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/est_vcm.R b/R/est_vcm.R index 62432374..fab8ccf6 100755 --- a/R/est_vcm.R +++ b/R/est_vcm.R @@ -167,7 +167,7 @@ pvcm.within <- function(formula, data, effect){ std <- matrix(unlist(lapply(vcov, function(x) sqrt(diag(x)))), nrow = length(ols), byrow = TRUE) dimnames(std)[1:2] <- list(names(vcov), colnames(vcov[[1L]])) std <- as.data.frame(std) - y <- unlist(split(model.response(data), cond)) # TODO: check if collapse::rsplit can be used + y <- unlist(rsplit(model.response(data), cond), use.names = FALSE) fitted.values <- y - residuals df.resid <- pdim$nT$N - card.cond * ncol(coef) nopool <- list(coefficients = coef,