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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

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

Date |
Mon, 18 May 2009 09:39:53 +0100 |

The program -tabm- in -tab_chi- from SSC might also help. Nick n.j.cox@durham.ac.uk Garry Anderson You could try the user written command -fre- -ssc install fre- The includelabeled, include(), and subpop() options may be relevant. Anna Reimondos 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. * * 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: RE: RE: Creating a table with list of variables, but showing all values even if value is not used***From:*Anna Reimondos <areimondos@gmail.com>

**References**:**st: Creating a table with list of variables, but showing all values even if value is not used***From:*Anna Reimondos <areimondos@gmail.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: AW: sts graph without title** - Next by Date:
**st: Any ways to specify the regression output to 2 decimal places?** - Previous by thread:
**Re: st: RE: Creating a table with list of variables, but showing all values even if value is not used** - Next by thread:
**Re: st: RE: RE: Creating a table with list of variables, but showing all values even if value is not used** - Index(es):

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