Rachel Lynne Wilkerson
Baylor University, Texas Hunger Initiative
“The poor are the ones who can never afford to have any bad luck. They can’t get an infection because they don’t have access to any medicine. They can’t get sick or miss their bus or get injured because they will lose their …job if they don’t show up for work. They can’t misplace their pocket change because it’s actually the only money they have left for food…Of course the bad news is, everybody has bad luck. It’s just that most of us have margins of resources and access to support that allow us to weather the storm…”
The Locust Effect by Haugen and Butros
plot(summer_net)
Decision nodes are all the program operations an organization could change.
summer_net<-setDecisionNodes(summer_net, Menu.Quality, Public.Transport, Media)
plot(summer_net)
Total Meals served measures utility for this particular problem
summer_net<-setDecisionNodes(summer_net, Menu.Quality, Public.Transport, Media)
summer_net<-setUtilityNodes(summer_net,Total.Meals)
plot(summer_net)
summer_net<-setDecisionNodes(summer_net, Menu.Quality, Public.Transport, Media)
summer_net<-setUtilityNodes(summer_net,Total.Meals)
trackedVars <- "Total.Meals"
policies=policyMatrix(summer_net)
invisible(compiledNets <- compileDecisionModel(summer_net, policyMatrix = policies))
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 0
## Unobserved stochastic nodes: 15
## Total graph size: 194
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
##
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 3
## Unobserved stochastic nodes: 12
## Total graph size: 178
##
## Initializing model
print(policies)
## Public.Transport Menu.Quality Media
## 1 1 1 1
## 2 2 1 1
## 3 1 2 1
## 4 2 2 1
## 5 1 1 2
## 6 2 1 2
## 7 1 2 2
## 8 2 2 2
The maximum expected utility indicates the best policy for the organization to adopt.
samples <- lapply(compiledNets,
HydePosterior,
variable.names = trackedVars,
n.iter=10000, trace=F)
lapply(samples, function(l) mean(as.numeric(l$Total.Meals)))
## [[1]]
## [1] 1.5744
##
## [[2]]
## [1] 1.5946
##
## [[3]]
## [1] 1.595
##
## [[4]]
## [1] 1.6061
##
## [[5]]
## [1] 1.5335
##
## [[6]]
## [1] 1.5501
##
## [[7]]
## [1] 1.5329
##
## [[8]]
## [1] 1.5423
In this instance the maximum expected utility corresponds to available public transport, high meal quality, and low media.
All models are wrong, but some are useful.
George Box