premium: Risk Premium computation

Description Usage Arguments Details Value Examples

View source: R/premium.R

Description

Risk Premium computation

Usage

1
premium(tbase, ce_data, rac, utility)

Arguments

tbase

Name of the base treatment/project

ce_data

data.frame with CE values previously computed

rac

Vector with RAC sequence used in the CE computation

utility

The utility function: "ExpNeg" if CE it was computed using Exponential Negative utility function. "Power" if the utility function was Power

Details

This function computes the risk premium values, regarding a project or treatment arbitrarily chosen by the user, using a CEs dataset (a 'certainty' object) already computed.

Value

Generates three objects: A data.frame with the total values of the premium risks; a data.frame with the percentage of difference with respect the base treatment; and a plot with the treatments' premium risk.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Example using profit dataset
data(profitSWG)

# First, compute the CE values
c1 <- certainty(data = profitSWG,ival = .5,fval = 4,utility = "Power")

ce_values <- c1$CE_values  # CE table
ce_rac <- c1$RAC           # RAC vector

# The Risk premium values respect to Serenade treatment
rp <- premium(tbase = "serenade", ce_data = ce_values,rac = ce_rac, utility = "Power")

rp$PremiumRisk       # absolute values
rp$PremiumRiskPer100 # values in percentage
rp$RP_plot()         # plot

ArielSotoCaro/ceRtainty documentation built on March 10, 2020, 6:55 a.m.