Learn R Programming

RSD (version 0.2.0)

ssd.plot: Drawing the SSD

Description

It visualize the SSD values of both prospects.

Usage

ssd.plot(sd.obj, names = c("1", "2"))

Value

A list, including plot elements.

Arguments

sd.obj

StochasticDominance object.

names

A character vector, including the names of prospects in order.

Details

The parameter `names` only accepts character vector, otherwise an error will be raised.

The function shows the line plot and returns its object for further modification.

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.plot(sd, names = c('First', 'Second'))

Run the code above in your browser using DataLab