iiori@@@wickeim@ier m@iii@g oii u@i-tuebi@ge@@de
2021-Feb-27 16:36 UTC
[R] confint() on mlm object requires named response matrix
Dear list, I fit a multivariate model and want to extract univariate confidence intervals from the mlm object. If the response matrix is unnamed, confint() just repeats the first interval. If the response matrix is named, confint() correctly returns CIs for all columns: set.seed(1143) Y <- MASS::mvrnorm(10, c(0, 0), diag(2)) # unnamed response matrix confint(lm(Y ~ 1)) 2.5 % 97.5 % :(Intercept) -0.7069968 0.2783868 :(Intercept) -0.7069968 0.2783868 # incorrect, same as first CI colnames(Y) <- 1:2 # named response matrix confint(lm(Y ~ 1)) 2.5 % 97.5 % 1:(Intercept) -0.7069968 0.2783868 2:(Intercept) -0.9226622 -0.1208534 # correct Is this intended behavior of confint()? I think it would be great if the unnamed case gave a warning. Or am I missing something? Best, Florian --- Florian Wickelmaier Department of Psychology University of Tuebingen