Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: varlist error? or feature?

From   Jeph Herrin <>
To   statalist <>
Subject   st: varlist error? or feature?
Date   Tue, 17 Oct 2006 15:33:28 -0400

Why have I never noticed this before? Stata 9, updated.

. d com1-com45

              storage  display     value
variable name   type   format      label      variable label
com1            byte   %8.0g                  BPH
medcom2         byte   %9.0g                  meds: CA
com2            byte   %8.0g                  CA
medcom3         byte   %9.0g                  meds: CHF/HTN
com3            byte   %8.0g                  CHF/HTN
medcom4         byte   %9.0g                  meds: ESRD
com4            byte   %8.0g                  ESRD
medcom5         byte   %9.0g                  meds: GERD
com5            byte   %8.0g                  GERD
medcom6         byte   %9.0g                  meds: HIV
com6            byte   %8.0g                  HIV
medcom7         byte   %9.0g                  meds: HTN

And I discovered it when

. egen total=rtotal(com1-com45)

totalled all the -medcom- variables as well. How can I reference
just those variables that start with -com-?


*   For searches and help try:

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