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: RE: Data manipulation question


From   "Kieran McCaul" <[email protected]>
To   <[email protected]>
Subject   st: RE: Data manipulation question
Date   Wed, 21 Apr 2010 08:58:04 +0800

...

set obs 350
replace ID = 100 + _n in 301/350
replace Group = 4 in 301/350




-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Debs Majumdar
Sent: Wednesday, 21 April 2010 7:49 AM
To: [email protected]
Subject: st: Data manipulation question

 Hello Statalisters,

             I am working with a dataset which has 300 students who are
divided into 4 categories (group is ordinal ranging from 1 to 4). E.g.

 ID                      Group 

101                       2

102                       1

103                       2
......................

399                       3

400                       4


 I want to add 50 dummy students to the dataset and put them into
category 4 in my group variable. What would be the best way to do that?

 Thanks,

   Debs



      

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

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index