try d com* or egen total=rtotal(com*)
you might also look at the -aorder- command
Rich
Jeph Herrin wrote:
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-?
thanks,
Jeph
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/