Learn R Programming

RSD (version 0.2.0)

createStochasticDominance: Constructor of StochasticDominance Class

Description

It is much easier to use this constructor to create an instance of the StochasticDominance class. It handles calculation of the cdf and ssd values in an efficient way.

Usage

createStochasticDominance(outcome1, outcome2, prob1, prob2)

Value

StochasticDominance object.

Arguments

outcome1, outcome2

Numeric vectors. The outcomes corresponding to each prospect.

prob1, prob2

Numeric vectors. The probabilities corresponding to each prospect.

See Also

[StochasticDominance()]

Examples

Run this code
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))

Run the code above in your browser using DataLab