The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » HELP!: Analysis on youth-specific age group only
Re: HELP!: Analysis on youth-specific age group only [message #1769 is a reply to message #1762] Wed, 02 April 2014 14:17 Go to previous messageGo to previous message
user-rhs is currently offline  user-rhs
Messages: 132
Registered: December 2013
Senior Member
OK, try this. Use the -svyset- command to tell Stata to weight point estimates as follows:

svyset [pweight=wgt]

Use the -svy- prefix before your tabulations

svy: tab v013

This will give you the proportions of women in the dataset that are in a particular age group. If you want the actual numbers, you would specify "count" as an option. For cross-tabulations, decide whether you want the row or column percentages, and specify either row or column as an option.

e.g.

svy: tab v013
svy: tab v013, count /* gives counts instead of percentages */
svy: tab v013 v155, row /*gives the row percentages */
svy: tab v013 v155, col /*gives the column percentages */
svy: tab v013 v155 /*without specifying row or column, percentages are taken out of the total N */


Note that the syntax for tabulation is tab rowvbl columnvbl. Stata will give you an error message if your column variable has too many unique values. So for example if you tried to do literacy by single year age, you will get:

svy: tab v155 v012,row
too many values
r(134);



You should swap it and make v012 the row variable and v155 the column vbl (and switch the specification of row or column percentages as necessary)

svy: tab v012 v155,col

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Missing data
Next Topic: browsing data
Goto Forum:
  


Current Time: Sun Nov 24 19:15:33 Coordinated Universal Time 2024