Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How do I create a new dataset with just one variable but 500,000 obs?


From   "Hagen von Hermanni" <[email protected]>
To   [email protected]
Subject   st: How do I create a new dataset with just one variable but 500,000 obs?
Date   Thu, 28 Aug 2008 18:22:53 +0200

Or to put it another way:
How can I tag specific observations (let�s say obs 1 to 100,000) and define their outcomes in variable x?

I need to create a reference dataset for weighting. I stratified my dataset into 16 cells. The reference dataset describes the city of Leipzig for sex, age and (un)employment. I stratified these informations likewise and hoped to finally crate a dataset with 504.000 observations and one variable, containing 16 categories. So I could calculate the needed weights to adjust my original sample to the population of Leipzig.

BUT, how to I define which observation belongs to which cell?

I started this way:

set obs 504000
generate cell = 0

Well, and now? I thought about the replace command

replace cell = 1 [ and here should be said which obs belong there!]

I really need help on this!

Thanks
Hagen



-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx
*
*   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