From 9afc4503dc9d5b0666be5538e84c7d0f1ba4c909 Mon Sep 17 00:00:00 2001 From: "Jannik H. Orzek" Date: Mon, 22 Jul 2024 19:37:13 +0200 Subject: [PATCH] Fix for missing scores in case of fiml. Only scores for the first group were reported due to seq_along always evaluating to 1. --- R/ctr_estfun.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ctr_estfun.R b/R/ctr_estfun.R index 2d2c29a4..e23e88a4 100644 --- a/R/ctr_estfun.R +++ b/R/ctr_estfun.R @@ -210,7 +210,7 @@ lav_scores_ml <- function(ntab = 0L, score.sigma <- matrix(0, nsub, nvar * (nvar + 1) / 2) score.mu <- matrix(0, nsub, nvar) - for (p in seq_along(length(M))) { + for (p in seq_len(length(M))) { ## Data # X <- M[[p]][["X"]] case.idx <- Mp$case.idx[[p]]