Statalist


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

st: Creating a table with list of variables, but showing all values even if value is not used


From   Anna Reimondos <[email protected]>
To   [email protected]
Subject   st: Creating a table with list of variables, but showing all values even if value is not used
Date   Mon, 18 May 2009 15:03:04 +1000

Hello,
I have a survey dataset with over 2,000 respondents and  I have
created 30 variables. These 30 variables describe  a persons activity
(e.g studying, employed) for each age between ages 15 to 44.
For example if someone was studying between 15 -17 and then starting
working full-time at age 18 the first 4 variables for this person
would be:

activity15  	activity16 	activity17   activity18

Studying 	 Studying  	Studying    Emp.FT


In total there are 12 possible activity categories people can be in at
each age, and the value label for each of the 30 variables is exactly
the same.

I would like to create a table with 30 columns and 12 rows, containing
the number of people and percentages in each category (row) at each
age (column). My current strategy is to tabulate each of the 30
variables separately and copy and paste the data into excel. (tab1
activity*).
Obviously if at some age no person is engaged in one of the 12
categories (e.g at 15 no one is employed full-time), this category is
not listed in the tabulation and it makes it very time consuming to
manually make sure the rows match in excel, when each of the tabs of
the variables has a different number of categories. Is there an easy
way to 'force' tab to show all the 12 categories but to have either a
missing or a zero to indicate that no one was in that category.

I hope I have made the question clear enough.

Thanks very much
Anna
*
*   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