Description Usage Arguments Details Value Author(s) References See Also Examples

Implementation of the classification technique based on assigning each observation to the group that minimizes the distance of the observation to the trimmed mean of the group.

1 | ```
classDS(xl,yl,xt,alpha=0.2)
``` |

`xl` |
an |

`yl` |
a vector of length |

`xt` |
an |

`alpha` |
the proportion of observations that are trimmed out when computing the mean. 0.2 by default. |

This classification method proceeds by first computing the alpha trimmed mean corresponding to each group from the learning set, then computing the distance from a new observation to each trimmed mean. The new sample will then be assigned to the group that minimizes such distance. At the moment, only the Euclidean distance is implemented.

`pred ` |
the vector of length |

Sara Lopez-Pintado sl2929@columbia.edu and

Aurora Torrente etorrent@est-econ.uc3m.es

Lopez-Pintado, S. *et al.* (2010). Robust depth-based tools for the analysis of gene expression data. *Biostatistics*, 11 (2), 254-264.

classTAD

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
## simulated data
set.seed(10)
xl <- matrix(rnorm(100),10,10); xl[1:5,]<-xl[1:5,]+1
yl <- c(rep(0,5),rep(1,5))
xt <- matrix(rnorm(100),10,10)
classDS(xl,yl,xt)
## real data
data(prostate)
prost.x<-prostate[,1:100]
prost.y<-prostate[,101]
set.seed(1)
learning <- sample(50,40,replace=FALSE)
yl <- prost.y[learning]
xl <- prost.x[learning,]
training <- c(1:nrow(prost.x))[-learning]
yt.real <- prost.y[training]
xt <- prost.x[training,]
yt.estimated <- classDS(xl,yl,xt)
yt.real==yt.estimated
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.