Statalist


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

Re: st: Creating a variable with gaps


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Creating a variable with gaps
Date   Thu, 19 Mar 2009 09:14:03 +0000 (GMT)

--- On Thu, 19/3/09, Johan Hellstrom wrote:
> > For graphing purposes I need to create a
> > (filter-)variable that assign a value to
> > every 1.000 observation 

--- On Thu, 19/3/09, Maarten buis wrote: 
> gen byte filter = mod(_n, 1000) == 0

Nick wrote a Stata Tip on this type of use
of the -mod()- function:

Nicholas J. Cox (2007) "Stata Tip 43:
Remainders, Selection, Sequences, extractions:
Uses of the modulus" The Stata Journal 7(1):
143--145.
http://www.stata-journal.com/article.html?article=pr0031

--Maarten


-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------






      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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