嗨,我正在尝试交叉验证我的多重逻辑预测模型。我以前在相同的数据上使用过以下代码,它从来没有给我带来问题,但现在它给出了等级不足错误。任何帮助将不胜感激。
`
quadratic <- qda(Outcome ~ Var1 + Var2 + Var3 + Var4, data = DATA, prior = c(0.14 , 0.86))
quadratic
## Data explanation below
## Var1: binary data
## Var2: Continuous data
## Var3: Continuous data
## Var4: Continuous data
0.14: 14% prevalance of disease in the population
0.86: 100-0.14
`
The error I am getting is the following:
"Error in qda.default(x, grouping, ...) : rank deficiency in group 1"
I tried removing the prior part of the command but I am still getting the error. I also tried to remove the most collinear variable which is Var2 but I am getting the same error.