 |
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: AW: RE: Data manipulation question
<>
The call could even be -replace ID = 100 + _n-, w/o the -in- qualifier,
since all IDs seem to follow this pattern.
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Kieran McCaul
Gesendet: Mittwoch, 21. April 2010 02:58
An: statalist@hsphsun2.harvard.edu
Betreff: st: RE: Data manipulation question
...
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/
*
* 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/