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

st: corresponding Stata command to SAS "retain" command


From   "Guanghui Li" <[email protected]>
To   <[email protected]>
Subject   st: corresponding Stata command to SAS "retain" command
Date   Fri, 22 Nov 2002 10:36:09 -0800

Dear all,
I am in the process of transfering a file from SAS to Stata. I encountered a
problem.
In Sas, command "retain" can create a large quantity of variables and set
them all equal to zero at the same time.
If it is only a couple of variables, I can easily do it in Stata:

gen x=0;
gen y=0;

however, I have  almost a hundred of them.
Is there a similiar command in Stata that does that?

Thank you in advance.

Sincerely,
Guanghui Li


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