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

From |
Anna Reimondos <areimondos@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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/

**Follow-Ups**:**RE: st: Creating a table with list of variables, but showing all values even if value is not used***From:*Roy Wada <roywada@hotmail.com>

**st: RE: Creating a table with list of variables, but showing all values even if value is not used***From:*Garry Anderson <g.anderson@unimelb.edu.au>

- Prev by Date:
**Re: st: Person-period dataset, stcox, subjects in analysis** - Next by Date:
**st: RE: Creating a table with list of variables, but showing all values even if value is not used** - Previous by thread:
**RE: st: AIC and BIC to compare parametric and non-parametric survival models** - Next by thread:
**st: RE: Creating a table with list of variables, but showing all values even if value is not used** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |