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

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to