Library: | metrics |
See also: | adeind adeslp |
Quantlet: | trimper | |
Description: | trims a given percentage of a (binned) data matrix |
Usage: | xt = trimper(x,perc) | |
Input: | ||
x | n x d matrix , the data matrix In the first row the values according to which the trimming should be done are expected. The second row should contain ; the frequency count for the values in the ; first row. | |
perc | scalar , the percentage of data points which should be trimmed maximal | |
Output: | ||
xt | l x d matrix , the trimmed data matrix |
library("metrics") perc = 5 x = 1:100 x = x~matrix(rows(x),1) xt = trimper(x,perc) xt
trimmed (and binned) data matrix