質問

When I run this line

my.lda<-lda(Group ~ X1+X2+X3+X4, data = df)

I get a long output that finish with this lines

Proportion of trace:

   LD1    LD2    LD3    LD4 

0.8750 0.0958 0.0286 0.0006 

How can I store the LD1 and LD2 proportion of trace in separate variables?

Thanks

役に立ちましたか?

解決

Try:

prop.table(my.lda$svd^2)

According to the documentation, lda(...)$svd is a vector of

the singular values, which give the ratio of the between- and within-group standard deviations on the linear discriminant variables. Their squares are the canonical F-statistics.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top