Skip to content
Prev 221043 / 398500 Next

predict.lda breaks when priors are specified

Dear R help,

What am I doing wrong here? when I don't specify the priors it works
just fine but when I specify the priors it breaks.? Does anyone know
why and how I can fix it?
----
+ data.frame(Y = 0, X = cbind(1,X[controls,])),
+ data.frame(Y = 1, X = cbind(1,X[cases,])))
? Y X.1??????? X.2
1 0?? 1? 0.6965323
2 0?? 1 -0.0817520
3 0?? 1? 2.8673412
4 0?? 1 -0.2351386
5 0?? 1? 0.2653452
6 0?? 1 -1.2437612
Error in model.frame.default(formula = Y ~ X, priors = c(0.95, 0.05),? :
? variable lengths differ (found for '(priors)')
Error in model.frame.default(formula = Y ~ X, priors = c(0.95, 0.05),? :
? variable lengths differ (found for '(priors)')
---
Thanks,
Andrew