Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: create many variables at once


From   [email protected]
To   "'[email protected]'" <[email protected]>
Subject   st: create many variables at once
Date   Mon, 22 Jul 2002 16:01:33 -0400

Perhaps someone can help me with this. I am not a programmer, so please be
explicit.
New question.
I have 19 variables that start with the prefix  me_  and 19 variables that
start with the prefix  ppg_ . They all have other letters after the
underscore, actually the same for each group of 19.

I have to create the following 19 new variables:		newvars=(me_
* var1)+(ppg_ * var1) for each observation in the data set (510)
Is there a way for me to do this in one step. If not, can you please tell me
how?
Thank you,
Elisabeth

Elisabeth Simantov, PhD
Research Associate
Center for Home Care Policy and Research
Visiting Nurse Service of NY
107 East 70th Street
New York, NY 10021

email: [email protected]



*
*   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/



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