我知道对具有多个LHS的线性模型的支持是有限的。但是当可以在"mlm“对象上运行函数时,我希望结果是可信的。使用rstudent
时,会产生奇怪的结果。这是一个bug,还是有其他的解释?
在下面的示例中,fittedA
和fittedB
是相同的,但在rstudent
的情况下,第二列不同。
y <- matrix(rnorm(20), 10, 2)
x <- 1:10
fittedA <- fitted(lm(y ~ x))
fittedB <- cbind(fitted(lm(y[, 1] ~ x)), fitted(lm(y[, 2] ~ x)))
rstudentA <- rstudent(lm(y ~ x))
rstudentB <- cbind(rstudent(lm(y[, 1] ~ x)), rstudent(lm(y[, 2] ~ x)))
https://stackoverflow.com/questions/46234857
复制相似问题