Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: Data manipulation question


From   "Kieran McCaul" <Kieran.McCaul@uwa.edu.au>
To   <statalist@hsphsun2.harvard.edu>
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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Debs Majumdar
Sent: Wednesday, 21 April 2010 7:49 AM
To: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index