hi, assume val is the test data while m is lda model value by using CV=F
x = predict(m, val) val2 = val[, 1:(ncol(val)-1)] # the last column is class label # col is sample, row is variable then I am wondering if x$x == (apply(val2*m$scaling), 2, sum) i.e., the scaling (is it coeff vector?) times val data and sum is the discrimant result $x? Thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.