Hi everyone,

I want to use RShiny to make a simulation of cost-effectiveness for two treatment strategies (say, therapy A vs. B). The input values should be mean costs and mean effectiveness of both strategies, together with standard deviations. The results (incremental cost-effectiveness ratio, ICER) should be calculated from it. This would be easy, but I also need cost-effectiveness acceptability curves (CEAC). For that, I need to bootstrap the results of two hypothetical trials with prespecified effectiveness and costs, plus standard deviation for each of them.

The general idea and outputs can be found on RPubs - R Simulation for CEACs and the codes on pastebin: R Simulation for CEACs - codes - Pastebin.com.

My skills in RShiny are very limited. So far, I managed to create a simple app that generates histograms of the distributions (and their differences) based on slider inputs of costs and effects of strategies 1 and 2.

Does anybody have an idea how to implement this in Shiny? In other words, the ICER plane with the "trial results" and the CEAC shoud be (re)generated when an input parameter is changed. My problems is mainly the following:

Bootstrapping of the results fails because I don't know how to put the generated input (e.g. 500 values each for costs1, effects1, costs2, effects2) in a data frame in RShiny. Any ideas on how to do bootstrapping in a Shiny app and plot the results?

I googled for hours and could neither find a similar app nor any solutions to my problem.

Thanks in advance!