Description Usage Arguments Details Value Warning Author(s) References See Also Examples
Robust linear discriminant analysis based on MCD and returns
the results as an object of class Linda
(aka constructor).
1 2 3 4 5 6 |
x |
a matrix or data frame containing the explanatory variables (training set). |
grouping |
grouping variable: a factor specifying the class for each observation. |
prior |
prior probabilities, default to the class proportions for the training set. |
tol |
tolerance |
method |
method |
alpha |
this parameter measures the fraction of outliers the algorithm should resist. In MCD alpha controls the size of the subsets over which the determinant is minimized, i.e. alpha*n observations are used for computing the determinant. Allowed values are between 0.5 and 1 and the default is 0.5. |
trace |
whether to print intermediate results. Default is |
... |
arguments passed to or from other methods |
details
Returns an S4 object of class Linda
Still an experimental version!
Valentin Todorov valentin.todorov@chello.at
Hawkins, D.M. and McLachlan, G.J. (1997) High-Breakdown Linear Discriminant Analysis, Journal of the American Statistical Association, 92, 136–143.
Todorov V. (2007) Robust selection of variables in linear discriminant analysis, Statistical Methods and Applications, 15, 395–407, doi:10.1007/s10260-006-0032-6.
Todorov, V. and Pires, A.M. (2007) Comparative Performance of Several Robust Linear Discriminant Analysis Methods. REVSTAT Statistical Journal, 5, p 63–83. URL www.ine.pt/revstat/pdf/rs070104.pdf.
Todorov V and Filzmoser P (2009), An Object Oriented Framework for Robust Multivariate Analysis. Journal of Statistical Software, 32(3), 1–47. URL http://www.jstatsoft.org/v32/i03/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Example anorexia
library(MASS)
data(anorexia)
## start with the classical estimates
lda <- LdaClassic(Treat~., data=anorexia)
predict(lda)@classification
## try now the robust LDA with the default method (MCD with pooled whitin cov matrix)
rlda <- Linda(Treat~., data= anorexia)
predict(rlda)@classification
## try the other methods
Linda(Treat~., data= anorexia, method="mcdA")
Linda(Treat~., data= anorexia, method="mcdB")
Linda(Treat~., data= anorexia, method="mcdC")
## try the Hawkins&McLachlan method
## use the default method
grp <- anorexia[,1]
grp <- as.factor(grp)
x <- anorexia[,2:3]
Linda(x, grp, method="fsa")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.