The file Medsim.R runs the simulation,
The file MSETab.R calls Avar.R and makes the table MSETab.tex 
