I am performing a canonial variates analysis (i.e., a linear discriminant analysis with 3 or more categories) using the lda()
funtion in the MASS
package in R. I had been reporting the likelihood of a particular observation pertaining to a particular category as a posterior probability, but my supervisor said they would like the conditional probability to be included as well similar to some of their previous work. When I asked how they did it, they said that used JMP or SPSS and it just automatically returned the values for them.
I do not have access to either of these programs, and trying to export the dataset and re-running the CVA (which is analyzed beforehand in R and those results are what go into the CVA) seems counterintuitive. I was wondering if there was any way to calculate conditional probability for a canonical variates analysis in R
, preferably a method that can be applied to the MASS
package. I looked around online and on StackOverflow and I couldn't find anything about calculating conditional probabilities in lda()
using MASS
.
predict.lda
method provided by MASS not sufficient? It provides posterior probabilities already. $\endgroup$