有什么方法可以处理包中的mlm
对象吗?mtable
memisc
在不使用多重响应矩阵的情况下,我想要的是:
library(car)
library(memisc)
lm1 = lm(Sepal.Length ~ Petal.Length + Petal.Width + Species, data=iris)
lm2 = lm(Sepal.Width ~ Petal.Length + Petal.Width + Species, data=iris)
mtable(lm1, lm2)
产生
Calls:
lm1: lm(formula = Sepal.Length ~ Petal.Length + Petal.Width + Species,
data = iris)
lm2: lm(formula = Sepal.Width ~ Petal.Length + Petal.Width + Species,
data = iris)
===============================================
lm1 lm2
-----------------------------------------------
(Intercept) 3.683*** 3.048***
(0.107) (0.094)
Petal.Length 0.906*** 0.155*
(0.074) (0.065)
Petal.Width -0.006 0.623***
(0.156) (0.136)
Species: versicolor/setosa -1.598*** -1.764***
(0.206) (0.180)
Species: virginica/setosa -2.113*** -2.196***
(0.304) (0.265)
-----------------------------------------------
R-squared 0.837 0.551
adj. R-squared 0.832 0.539
sigma 0.339 0.296
F 185.769 44.496
p 0.000 0.000
Log-likelihood -48.116 -27.711
Deviance 16.681 12.708
AIC 108.231 67.423
BIC 126.295 85.486
N 150 150
===============================================
但:
mlmIris = lm(cbind(Sepal.Length, Sepal.Width) ~ Petal.Length + Petal.Width + Species, data=iris)
mtable(mlmIris)
生产
Error in qt(p = alpha/2, df = dendf) :
Non-numeric argument to mathematical function
我不会重现我尝试提取lm
可以在mtable
. 可以说,它们都不起作用。