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: Computation across observations
From
"Dudekula, Anwar" <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: Computation across observations
Date
Mon, 7 Nov 2011 04:29:57 +0000
Hi everybody ,
I am working on a dataset with a multiple variables.I am copying only a part of the dataset here for clarity of question.
----------------------------------------------
var1 var2 var3 var4
560.9 596.1 568 305.1
355.8 441.4 496 530.81
530.81 . . .
568 530.81 . 414
701.9 565.1 . .
714 530.81 493.9 729.1
564 305.1 789.04 .
537 786.59 403.9 585.9
566 569.2 995.92 565.1
----------------------------------------------
Question :
How do I create a variable(Eg: newvar) whose value would be 1 if any value in a row would be equal to a particular value( eg 701.8 etc) or a set of values( eg 701.8 456.5 22.35 etc) .
As the values are not integers the "egen command" would not work here !!
Thank you very much for your help
Sincerely
Anwar
*
* 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/