Statalist The Stata Listserver


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

st: svmat question


From   Jack Northrup <[email protected]>
To   [email protected]
Subject   st: svmat question
Date   Mon, 16 Apr 2007 09:57:37 -0700

I am using weighted data. I use svy: tab to get a grouping of a variable agegroup (7 categories).

I save the percentages using the svmat command. If there are no observations for the agegroup, the category does not show up in the display and the svmat variable only produces percentages of categories where the number of observations>0.

Is there any way to have Stata include the agegroup and report 0%? By doing this, I would have a full matrix for all 7 categories, even those where there are no observations for the category.

The reason I ask, is that I am doing this several times and if I outsheet the results, insheet the results and merge or append, I may have one set of data that has all seven categories, but the next set may have only 6 categories and when the 2 are combined they offset, resulting in inaccurate information. I am wondering if the answer lies in the svy:tab command rather than the svmat command. Hope this is understandable and thanks for any input.

Jack Northrup

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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