Learn R Programming

generalCorr (version 1.2.0)

exactSdMtx: Exact stochastic dominance computation from areas above ECDFs compared to common reference minimum (refmin) for order SD1 to SD4

Description

This function inputs 'mtx' (n X p) matrix data (e.g. monthly returns on p stocks) Its output has four matrices SD1 to SD4 each with dimension (n X p).

Usage

exactSdMtx(mtx, howManySd = 0.1)

Arguments

mtx

(n X p) matrix of data. For example, returns on p stocks n months

howManySd

used to define (x.ref)= lowest return number by going default=0.1 howManySd =number of maximum standard deviations in the data below the all-row all-column minimum return in the data

Value

four matrices SD1 to SD4 for four order of stochastic dominance over a common x.ref. The "out" matrix is another output having 4 rows for SD1 to SD4 and p columns (p=No. of columns in data matrix mtx).

Examples

Run this code
# NOT RUN {
x1=c(2,5,6,9,13,18,21)
x2=c(3,6,9,12,14,19,27) 
st1=exactSdMtx(cbind(x1,x2))


# }

Run the code above in your browser using DataLab