Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to generate variables by period


From   Xixi Lin <[email protected]>
To   statalist <[email protected]>
Subject   st: How to generate variables by period
Date   Mon, 11 Feb 2013 14:18:30 -0500

Hi All,

I want to generate a benchmark, which equals 4/n, while n is the
number of observations and changes for each period out of 120 periods.
For example,
period 1: n=2000, benchmark=4/2000
period 2: n=3000, benchmark=4/3000
......
period 120: n=1800, benchmark=4/1800

How can I generate this benchmark more efficiently, for instance, write a loop?

Thanks.

Xixi Lin
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index