Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

# Returns weighted percentiles of a sample 1.0

Date Added: May 27, 2013  |  Visits: 332

The idea is to give more emphasis in some examples of data as compared toothers by giving more weight. For example, we could give lower weights tothe outliers. The motivation to write this function is to compute percentilesfor Monte Carlo simulations where some simulations are very bad (in terms ofgoodness of fit between simulated and actual value) than the others and togive the lower weights based on some goodness of fit criteria.USAGE: y = WPRCTILE(X,p) % This is same as PRCTILE y = WPRCTILE(X,p,w) y = WPRCTILE(X,p,w,type) INPUT: X - vector or matrix of the sample data p - scalar or a vector of percent values between 0 and 100 w - positive weight vector for the sample data. Length of w must be equal to either number of rows or columns of X. If the weights are equal, then WPRCTILE is same as PRCTILE. type - an integer between 4 and 9 selecting one of the 6 quantile algorithms. OUTPUT: y - percentiles of the values in X When X is a vector, y is the same size as p, and y(i) contains the P(i)-th percentile. When X is a matrix, WPRCTILE calculates percentiles along dimension DIM which is based on: if size(X,1) == length(w), DIM = 1; elseif size(X,2) == length(w), DIM = 2; EXAMPLES: x = randn(1000,1); w = rand(1000,1); y = wprctile(x,[2.5 25 50 75],w,7)

 Requirements: No special requirements Platforms: Matlab Keyword: Columns,  Equal,  Integer,  Length,  Matrix,  Number,  Positive,  Selecting,  Wprctile Users rating: 0/10