Learn R Programming

RSD (version 0.2.0)

fsd.test: Compares random prospects by FSD

Description

It compares two random prospects by the first-order stochastic dominance (FSD).

Usage

fsd.test(sd.obj)

Value

An integer, indicating the index of the dominant prospect.

Arguments

sd.obj

StochasticDominance object.

Details

A prospect dominates when its CDF is below the other one. It means that all element of the CDF 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 FSD, it returns 0. It means that the CDFs intersect each other.

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))
fsd.test(sd)

Run the code above in your browser using DataLab