Write Code function

write_code(simulation, endpoint, selections)

Arguments

simulation

A purpose, either "Simulation" or "Analysis"

endpoint

An endpoint type, one of "Binary", "Normal" or "Survival"

selections

input from UI