Stata: Data Analysis and Statistical Software
Bookmark and Share


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

st: Going from frequencies to individual data


From   K Jensen <k.x.jensen@gmail.com>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Going from frequencies to individual data
Date   Tue, 29 Jan 2013 13:19:19 +0000

Hi Statalisters

I have frequency data that I would like to transform to individual
data. It is fruit and vegetable intake categorised by smoking. So I
would like to go from:

frandveg	smoke=0	smoke=1	total
0	0	2	2
0.5	1	0	1
1	2	3	5 etc

To
frandveg	smoke
0	1
0	1
0.5	0
1	0
1	0
1	1
1	1
1	1

How would I go about this?

Thankyou

Karin
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2013 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index