Skip to content

Commit

Permalink
pvcm: substitute base R#s split with faster collapse::rsplit
Browse files Browse the repository at this point in the history
  • Loading branch information
tappek committed Jul 6, 2024
1 parent 7b674f6 commit eb24bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/est_vcm.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit eb24bf7

Please sign in to comment.