Generate variable containing sum across variables ------------------------------------------------- ^genvsum^ varlist [^if^ exp] [^in^ range], ^generate(^newvar^)^ adds newvar to your data containing the sum, for each observation, of the variables in varlist. The calculated sum excludes missing values, if any. The ^generate()^ "option" is not optional. Example: . ^genvsum x1-x3, gen(avg)^ creates the variable ^avg^ containing the sum of ^x1^ through ^x3^ for each observation. This is a minor modification of the STATA-supplied program, genvmean.