eviSimulation {decisionSupport} | R Documentation |
Expected Value of Information (EVI) Simulation.
Description
The Expected Value of Information (EVI) is calculated based on a Monte Carlo simulation of the expected welfare (or values or benefits) of two different decision alternatives. The expected welfare is calculated for the current estimate of variables determining welfare and a prospective estimate of these variables. The prospective estimate resembles an improvement in information.
Usage
eviSimulation(
welfare,
currentEstimate,
prospectiveEstimate,
numberOfModelRuns,
randomMethod = "calculate",
functionSyntax = "data.frameNames",
relativeTolerance = 0.05,
verbosity = 0
)
Arguments
welfare |
either a |
currentEstimate |
|
prospectiveEstimate |
|
numberOfModelRuns |
|
randomMethod |
|
functionSyntax |
|
relativeTolerance |
|
verbosity |
|
Details
The Expected Value of Information (EVI)
The Expected Value of Information is the decrease in the \textrm{EOL}
for an information
improvement from the current (\rho_X^{current}
) to a better prospective (hypothetical)
information (\rho_X^{prospective}
):
\textrm{EVI} := \textrm{EOL}(\rho_X^{current}) - \textrm{EOL}(\rho_X^{prospective}).
Value
An object of class eviSimulation
with the following elements:
$current
-
welfareDecisionAnalysis
object forcurrentEstimate
$prospective
-
welfareDecisionAnalysis
object for singleprospectiveEstimate
or a list ofwelfareDecisionAnalysis
objects forprospectiveEstimate
being a list ofestimate
s. $evi
-
Expected Value of Information(s) (EVI)(s) gained by the prospective estimate(s) w.r.t. the current estimate.
References
Hubbard, Douglas W., How to Measure Anything? - Finding the Value of "Intangibles" in Business, John Wiley & Sons, Hoboken, New Jersey, 2014, 3rd Ed, https://www.howtomeasureanything.com/.
Gravelle, Hugh and Ray Rees, Microeconomics, Pearson Education Limited, 3rd edition, 2004.
See Also
welfareDecisionAnalysis
, mcSimulation
, estimate
,
summary.eviSimulation
Examples
#############################################################
# Example 1 Only one prospective estimate:
#############################################################
numberOfModelRuns=10000
# Create the estimate object:
variable=c("revenue","costs")
distribution=c("posnorm","posnorm")
lower=c(10000, 5000)
upper=c(100000, 50000)
currentEstimate<-as.estimate(variable, distribution, lower, upper)
prospectiveEstimate<-currentEstimate
revenueConst<-mean(c(currentEstimate$marginal["revenue","lower"],
currentEstimate$marginal["revenue","upper"]))
prospectiveEstimate$marginal["revenue","distribution"]<-"const"
prospectiveEstimate$marginal["revenue","lower"]<-revenueConst
prospectiveEstimate$marginal["revenue","upper"]<-revenueConst
# (a) Define the welfare function without name for the return value:
profit<-function(x){
x$revenue-x$costs
}
# Calculate the Expected Value of Information:
eviSimulationResult<-eviSimulation(welfare=profit,
currentEstimate=currentEstimate,
prospectiveEstimate=prospectiveEstimate,
numberOfModelRuns=numberOfModelRuns,
functionSyntax="data.frameNames")
# Show the simulation results:
print(summary(eviSimulationResult))
#############################################################
# (b) Define the welfare function with a name for the return value:
profit<-function(x){
list(Profit=x$revenue-x$costs)
}
# Calculate the Expected Value of Information:
eviSimulationResult<-eviSimulation(welfare=profit,
currentEstimate=currentEstimate,
prospectiveEstimate=prospectiveEstimate,
numberOfModelRuns=numberOfModelRuns,
functionSyntax="data.frameNames")
# Show the simulation results:
print(summary((eviSimulationResult)))
#############################################################
# (c) Two decision variables:
decisionModel<-function(x){
list(Profit=x$revenue-x$costs,
Costs=-x$costs)
}
# Calculate the Expected Value of Information:
eviSimulationResult<-eviSimulation(welfare=decisionModel,
currentEstimate=currentEstimate,
prospectiveEstimate=prospectiveEstimate,
numberOfModelRuns=numberOfModelRuns,
functionSyntax="data.frameNames")
# Show the simulation results:
print(summary((eviSimulationResult)))
#############################################################
# Example 2 A list of prospective estimates:
#############################################################
numberOfModelRuns=10000
# Define the welfare function with a name for the return value:
profit<-function(x){
list(Profit=x$revenue-x$costs)
}
# Create the estimate object:
variable=c("revenue","costs")
distribution=c("posnorm","posnorm")
lower=c(10000, 5000)
upper=c(100000, 50000)
currentEstimate<-as.estimate(variable, distribution, lower, upper)
perfectInformationRevenue<-currentEstimate
revenueConst<-mean(c(currentEstimate$marginal["revenue","lower"],
currentEstimate$marginal["revenue","upper"]))
perfectInformationRevenue$marginal["revenue","distribution"]<-"const"
perfectInformationRevenue$marginal["revenue","lower"]<-revenueConst
perfectInformationRevenue$marginal["revenue","upper"]<-revenueConst
# (a) A list with one element
prospectiveEstimate<-list(perfectInformationRevenue=perfectInformationRevenue)
# Calculate the Expected Value of Information:
eviSimulationResult<-eviSimulation(welfare=profit,
currentEstimate=currentEstimate,
prospectiveEstimate=prospectiveEstimate,
numberOfModelRuns=numberOfModelRuns,
functionSyntax="data.frameNames")
# Show the simulation results:
print(summary(eviSimulationResult))
#############################################################
# (b) A list with two elements
perfectInformationCosts<-currentEstimate
costsConst<-mean(c(currentEstimate$marginal["costs","lower"],
currentEstimate$marginal["costs","upper"]))
perfectInformationCosts$marginal["costs","distribution"]<-"const"
perfectInformationCosts$marginal["costs","lower"]<-costsConst
perfectInformationCosts$marginal["costs","upper"]<-costsConst
prospectiveEstimate<-list(perfectInformationRevenue=perfectInformationRevenue,
perfectInformationCosts=perfectInformationCosts)
# Calculate the Expected Value of Information:
eviSimulationResult<-eviSimulation(welfare=profit,
currentEstimate=currentEstimate,
prospectiveEstimate=prospectiveEstimate,
numberOfModelRuns=numberOfModelRuns,
functionSyntax="data.frameNames")
# Show the simulation results:
print(summary(eviSimulationResult))
#############################################################
# Example 3 A list of prospective estimates and two decision variables:
#############################################################
numberOfModelRuns=10000
# Create the current estimate object:
variable=c("revenue","costs")
distribution=c("posnorm","posnorm")
lower=c(10000, 5000)
upper=c(100000, 50000)
currentEstimate<-as.estimate(variable, distribution, lower, upper)
# Create a list of two prospective estimates:
perfectInformationRevenue<-currentEstimate
revenueConst<-mean(c(currentEstimate$marginal["revenue","lower"],
currentEstimate$marginal["revenue","upper"]))
perfectInformationRevenue$marginal["revenue","distribution"]<-"const"
perfectInformationRevenue$marginal["revenue","lower"]<-revenueConst
perfectInformationRevenue$marginal["revenue","upper"]<-revenueConst
perfectInformationCosts<-currentEstimate
costsConst<-mean(c(currentEstimate$marginal["costs","lower"],
currentEstimate$marginal["costs","upper"]))
perfectInformationCosts$marginal["costs","distribution"]<-"const"
perfectInformationCosts$marginal["costs","lower"]<-costsConst
perfectInformationCosts$marginal["costs","upper"]<-costsConst
prospectiveEstimate<-list(perfectInformationRevenue=perfectInformationRevenue,
perfectInformationCosts=perfectInformationCosts)
# Define the welfare function with two decision variables:
decisionModel<-function(x){
list(Profit=x$revenue-x$costs,
Costs=-x$costs)
}
# Calculate the Expected Value of Information:
eviSimulationResult<-eviSimulation(welfare=decisionModel,
currentEstimate=currentEstimate,
prospectiveEstimate=prospectiveEstimate,
numberOfModelRuns=numberOfModelRuns,
functionSyntax="data.frameNames")
# Show the simulation results:
print(sort(summary(eviSimulationResult)),decreasing=TRUE,along="Profit")