Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Rebecca Pietrelli <rebecca.pietrelli@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: svy: total command |

Date |
Tue, 20 Nov 2012 13:18:16 +0100 |

Dear Steve, first of all, I am very sorry. My question was inaccurate and I know that time is precious! The survey I am using collects information on households residing in Uganda. Sampling design: A two-stage stratified sample design was adopted. First stage: Selection of Enumeration Areas (ea), proportionally done on the basis of the number of households according to Uganda Household Survey. Also the selection was done separately for urban and rural areas. Second stage: systematic sampling procedure was adopted in order to select (in each ea) 4 households with an international migrant, 3 households with one or more internal migrant and 3 with no migrants. In one data file, for each household, the list of household members living outside the household is reported, with all the information about each migrant, including remittances behaviour. In the second data file, for each household, the list of non-household members who remit to the household is reported, with all the information about each migrant. The aim of my analysis it to compute the total amount of remitters (and remittances), both former household members and non-household members (namely household members and friends), distinguishing internal and international remitters. I used the following commands in both data files. . svyset earea [pw=hhweight], strata(stratum) pweight: hhweight VCE: linearized Single unit: missing Strata 1: stratum SU 1: earea FPC 1: <zero> I have generated a dummy variable, labelled internal, = 1 if the migrant has migrated within Uganda and = 0 if the migrant has migrated out of Uganda. Also I have generated a dummy variable, labelled dremit1, = 1 if the migrant remits and zero otherwhise. I used the following command to compute the total number of remitters in each data files (hh members and friends), distinguishing internal (1) and international(0): First file: former household members: . svy, over(internal): total dremit1 (running total on estimation sample) Survey: Total estimation Number of strata = 2 Number of obs = 1645 Number of PSUs = 191 Population size = 4942119 Design df = 189 0: internal = 0 1: internal = 1 -------------------------------------------------------------- | Linearized Over | Total Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ dremit1 | 0 | 233898.1 29978.48 174762.7 293033.5 1 | 1064315 131143.6 805622.1 1323009 -------------------------------------------------------------- Second file: Non-household members: . svy, over(internal): total dremit1 (running total on estimation sample) Survey: Total estimation Number of strata = 2 Number of obs = 217 Number of PSUs = 90 Population size = 564846 Design df = 88 0: internal = 0 1: internal = 1 -------------------------------------------------------------- | Linearized Over | Total Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ dremit1 | 0 | 101800.5 22591.33 56905 146696 1 | 324690.8 66555.15 192426.4 456955.2 -------------------------------------------------------------- Finally, I think to sum the total numbers of remitters (household members and non-household members), separating internal and international migrants. In other words, the results obtained from the two tables above. Also I have applied the same procedure to compute the total amount of remittances. Is this procedure (working on two data files) correct? The weights are at household level and I am computing the total number of remitters. Is there a problem of bias, like here? If yes, How can I solve it? http://www.stata.com/statalist/archive/2010-09/msg00445.html Thank you and sorry again! Rebecca 2012/11/20 Steve Samuels <sjsamuels@gmail.com>: > There's no such thing in Stata as a "label variable". I'm guessing that > you refer to a variable with values 1 = "Yes" 2 = "No". that has been > assigned a "value label" the name of which you can find with "des > q518_1" In that case, -total dremit1- is correct. If there are other > numbered responses that you con't want to count as "No", (e.g. 8= > "Refused", 9="Not Applicable"), you might have to restrict to "Yes" and > "No", e.g. > > ************************ > svy, subpop(if inlist(q518_1,1,2) over(internal): total dremit1 > ************************ > > But _if_ q518_1 is coded just as "internal" is coded, then > generating dremit1 was unnecessary. > > > When you joined Statalist you you received a welcome email that stated: > "Please read that FAQ at your convenience, but certainly before you post > anything to the list." > > I would not have guess what your variables are if you had followed > Statalist FAQ Section 3.3, first sentence: "Say exactly what you typed > and exactly what Stata typed (or did) in response. N.B. exactly!". > If you had yourself compared the results of the two -total- statements, > the answer to your question might have been obvious, making a post > unnecessary. > > Steve > > > On Nov 19, 2012, at 5:49 AM, Rebecca Pietrelli wrote: > > Dear all, > > I am using the Stata command svy: total, in order to estimate the > total number of migrants from Uganda, residing within or outside > Uganda, who remit money to their origin family. > > > The specific command I am using is: > > . tab q518_1, gen(dremit) > > (the answer to the question 5.18_1 is a label variable: yes if the > migrant remits and no otherwhise) > > . svy, over(internal): total dremit1 > > (internal = 1 if the migrant has migrated within Uganda and 0 otherwhise). > > > Is this procedure correct? > Or should I use total command directly on label variable q518_1? > > thank you > Rebecca > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: svy: total command***From:*Steve Samuels <sjsamuels@gmail.com>

**References**:**st: svy: total command***From:*Rebecca Pietrelli <rebecca.pietrelli@gmail.com>

**Re: st: svy: total command***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Re: st: Chi-Square-Test for Homogeneity** - Next by Date:
**st: Chi-Square-Test for Homogeneity** - Previous by thread:
**Re: st: svy: total command** - Next by thread:
**Re: st: svy: total command** - Index(es):