For that question see this discussion (tldr: There is a generated_quantities() function) :
generated_quantities()