View source: R/plot_optimaldecision.R
PlotOptimalDecision | R Documentation |
See Figure 6 for example.
PlotOptimalDecision(res, colname.d, idx = NULL)
res |
The data frame generated from |
colname.d |
The column name of decision to be plotted. |
idx |
The row index of observations to be included. The default is all the observations from the data. |
A ggplot.
data(synth)
sample_mcmc <- AiEvalmcmc(data = synth, n.mcmc = 10)
sample_optd <- CalOptimalDecision(
data = synth, mcmc.re = sample_mcmc,
c0.ls = seq(0, 5, 1), c1.ls = seq(0, 5, 1),
size = 1
) # adjust the size
sample_optd$cash <- sample_optd$d1 + sample_optd$d2 + sample_optd$d3
PlotOptimalDecision(sample_optd, "cash")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.