Statalist The Stata Listserver


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

RE: st: Socio-economic multi-variable analysis


From   "Todd Swarthout" <[email protected]>
To   <[email protected]>
Subject   RE: st: Socio-economic multi-variable analysis
Date   Fri, 8 Dec 2006 15:17:47 +0100

Im sorry, let me try to explain again...I suspect the answer is quite easy.

I have 350 questionnaires, each with an ID number (variable = idno). Each questionnaire can have up to 11 total yes responses to the 11 questions having to do with socio-ecinomic status (variables 48a - 48k). I would like to know for each ID number how many yes ('1') respondes there are within these 11 questions...without having to do a command for each ID number. 

Maybe something like "list idno if 48a-48k 'contain' 1 yes responses"...and then perhaps I could do this command for each possible number of 'yes' responses.

"list idno if 48a-48k 'contain' 1 yes responses"
"list idno if 48a-48k 'contain' 2 yes responses"
"list idno if 48a-48k 'contain' 3 yes responses"

Etc...

In the end Id like the table

ID No./ No. 'yes' responses in questions 48a - 48k	
	/
	/


Thanks

Todd

-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la part de Gustaf Rydevik
Envoy� : vendredi 8 d�cembre 2006 14:39
� : [email protected]
Objet : Re: st: Socio-economic multi-variable analysis

On 12/8/06, Todd Swarthout <[email protected]> wrote:
> Hello.
>
> I sent this before (3 december) but have yet to see the query on the 
> statalist discussion. How long does it usually take??
>
> I'm a bit new to all this, so this query may seem a bit basic, but: I 
> have a STATA database from a household survey recently completed in 
> southern Africa (n=350). Within the questionanire I have 11 queries 
> having to do with household economics, answered 'no' or 'yes' (coded 0 
> and 1, respectively). For example, 'Can the household afford to buy 
> meat at least one time per week?' Can someone help with a STATA 
> command to tell me which questionnaires have 1 or 2 or 3, etc 'yes' 
> responses within these 11 questions...I want to eventually define a 
> threshold of poverty within the sample. Thanks
>
> Todd
>

Unless I'm missing something...

gen NumYesAnswers=question1+question2+question3+question4+question5+question6+question7+question8+question9+question10+question11

,should give what you want, no? The number of "yes"-answers to the questions for each household.

/Gustaf

ps:Where in Africa are you working? I'm with the Iganga DSS in Uganda. ds.


--
email:[email protected]
tel: +46(0)703051451
address: Kantorsgatan 50:190 75424 Uppsala Sweden
*
*   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/

*
*   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