我正在玩 R 的汽车库,在我的数据模型上调用 variance_inflation_factors 函数后遇到了以下警告。
没有找到与从“SparseM”导出的方法对应的函数:“coerce”</p>
此错误是以下代码的结果
library(car)
data = read.table("path/to/data.txt")
attach(data)
model = lm(Y ~ X1 + X2 + X3)
vif(model)
但仍会产生常规输出,显示为
X1 X2 X3
1.578524 2.276641 2.021541
总之,输出显示为
Warning message:
no function found corresponding to methods exports from ‘SparseM’ for: ‘coerce’
X1 X2 X3
1.578524 2.276641 2.021541
我的输出是否受到缺少强制方法的影响?