Learn R Programming

RSD (version 0.2.0)

ssd.test: Compares random prospects by SSD

Description

It compares two random prospects by the second-order stochastic dominance (SSD).

Usage

ssd.test(sd.obj)

Value

A number. Indicating dominant prospect index.

Arguments

sd.obj

StochasticDominance object.

Details

A prospect dominates when its SSD is below the other one. It means that all element of the SSD vector must be equal or smaller, and at least one element should be smaller for the dominant prospect.

If neither prospect dominates the other by SSD, it returns 0. It means the SSDs intersect each other.

See Also

[ssd.calc()] for the calculation.

Examples

Run this code
sd = createStochasticDominance(outcome1 = c(1,4,7),
                               outcome2 = c(2,3,5),
                               prob1 = c(1/3,1/3,1/3),
                               prob2 = c(1/6,1/6,2/3))
ssd.test(sd)

Run the code above in your browser using DataLab