[R] PROC DISCRIM vs. lda( ) in MASS
sasprog474 at yahoo.com
Tue Apr 17 15:58:46 CEST 2007
I am using WinXP, R version 2.3.1, and SAS for PC version 8.1.
I have mostly used SAS over the last 4 years and would like to
compare the output of PROC DISCRIM to that of lda( ) with respect
to a very specific aspect. My data have k=3 populations and there
are 3 variates in the feature space. When using using the code
PROC DISCRIM DATA = FOO OUT = FOO_OUT OUTSTAT = FOOSTAT
METHOD = NORMAL LIST POOL = YES PCOV MANOVA;
VAR X1 X2 X3;
I am able to easily obtain the linear discriminant functions for
the strata which allow computation of the three discriminant
scores for a given observation. This information is contained
in WORK.FOOTSTAT and may be extracted by subsetting:
SET FOOSTAT(WHERE = (_TYPE_ = LINEAR));
To actually implement the linear discriminant functions takes
a bit more formatting, but there it is.
My question: Where is this information stored in R? I completely
understand that predict( ) or predict.lda( ) are the preferable
ways to obtain a classification prediction for new observations.
I still want to "see" the individual lin. discrim. functions and
work with them myself. I have been using
x.lda <- lda(Strata ~ X1 + X2+ X3, data = foo.frame)
to construct the analysis.
More information about the R-help