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" <>
To   <>
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
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.

Guanghui Li

*   For searches and help try:

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