apaCorrel.Conditional.Quantile.Upper.Data(X, Y, Quantile)
=apaCorrel.Conditional.Quantile.Upper.Data(X, Y, Quantile)Result
Returns the observations where X is above the quantile.
Syntax
X: data vector (row or column) containing a time series
Y: data vector (row or column) containing a time series, same length as X
Quantile: quantile as a fraction between 0 and 1 (e.g. 0.1 for 10%)
Remarks
Observations are selected by X only. Observations are ranked per series (rank 1 = lowest, tied values receive their average rank). An observation is at or below the quantile if its rank is at most Quantile x n, and above otherwise. Returns an n x 2 matrix with X in the first and Y in the second column, in the original order; rows that are not selected return #N/A, so the output can be charted directly. X and Y may be row or column vectors and must have the same length n. The selection is identical to the one used by the corresponding apaCorrels.Conditional function.
