[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Summing across variables

From   "John Pfaff" <>
To   <>
Subject   st: Summing across variables
Date   Tue, 06 Oct 2009 15:51:40 -0400


I am trying to create a fast way to generate a new variable that is the sum of a lot of variables. Obviously varnew = var1 + var2 + var3 works, but I have to think there is a better way, since I may have up to 50 or 100 variables across which I want to sum. Handtyping that out seems inefficient, and I'd like the flexibility of being able to vary the number of variables I'm summing across easily. Thanks so much for any suggestions!

All the best,


Associate Professor of Law
Fordham University School of Law
140 West 62nd Street
New York, New York 10023
Phone:  (212) 636-7661
Fax:       (212) 636-6899

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index