Example: biology

Computing Poverty measures with R vs. Stata …

Computing Poverty measures with R vs. Stata Rosendo Ramirez and Darryl McLeod Professor Vinod R-Group presentation, May 1, 2014 Fordham University E-530 Dealy 12 noon Outline of Presentation 1. Accessing survey data in R and Stata , Peru has a survey of about 25,000 persons, a longitudinal panel, 2007 to 2011. We are using the 2011 survey data, reading it first into Stata (it is published in Stata format by the Peruvian ..???) 2. To make the survey same representative of the 30 million people in Peru, we have to weight each family by its relative prevalence in the national population. This weight scheme is accomplished by svyset in Stata and, more or less, by a subroutine called svydesign in R. 3. We also use a program called sepov to computer p(0), p(1) and p(2) three standard Poverty measures derived from the Foster-Greer-Thorbeke or FGT Poverty index.

Background note on the FGT poverty and severity measures: the headcount or H or p(0) or the poverty gap (H*I where I has distance below the poverty line of …

Tags:

  Measure, Poverty, Poverty measures

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Computing Poverty measures with R vs. Stata …

1 Computing Poverty measures with R vs. Stata Rosendo Ramirez and Darryl McLeod Professor Vinod R-Group presentation, May 1, 2014 Fordham University E-530 Dealy 12 noon Outline of Presentation 1. Accessing survey data in R and Stata , Peru has a survey of about 25,000 persons, a longitudinal panel, 2007 to 2011. We are using the 2011 survey data, reading it first into Stata (it is published in Stata format by the Peruvian ..???) 2. To make the survey same representative of the 30 million people in Peru, we have to weight each family by its relative prevalence in the national population. This weight scheme is accomplished by svyset in Stata and, more or less, by a subroutine called svydesign in R. 3. We also use a program called sepov to computer p(0), p(1) and p(2) three standard Poverty measures derived from the Foster-Greer-Thorbeke or FGT Poverty index.

2 4. We find that the Stat and R routines are equally capable of Computing basic Poverty rates, but so far we have not been able to implement the survey design or weighting scheme Stata uses to make a HH survey representative of the entire population. 5. On the other hand, R is free and constantly being updated and it present capacity to handle large data sets such as the peru survey of 25,000 households is impressive. 6. As of this writing, Stata s panel data routines (not shown here) are a bit easier to use that those R. In fact we have not figured out how to load the entire 5 year Peruvian survey into R (suggestions welcome). Resources/Files Camtasia Tutorial for R-Studio Early version (needs editing) (you can download this mp4 videos) How do I use the Stata survey (svy) commands? The Peruvian Nuevo Sol is the currency of Peru.

3 Our currency rankings show that the most popular Peru Nuevo Sol exchange rate is the PEN to USD rate. The currency code for Nuevos Soles is PEN, and the currency symbol is S/.. Data: 2011 HH Survey data for Peru, from the Stata Do file for tutorial: Sample Stata output with notes All files on R files: R file for reading Stata survey data R inflation VAR data (not sure what this file is) Background note on the FGT Poverty and severity measures : the headcount or H or p(0) or the Poverty gap (H*I where I has distance below the Poverty line of the average poor person) and the severity measure p(2) or gap squared. A useful, encompassing measure of Poverty is the Foster, Greer, Thorbeke (FGT) index, where n is total population, q is the population below the Poverty line yp and yi is the income of poor person i.

4 The income gap or shortfall of each poor 1(1/ )qpiiiipyyFGTnv where vy where yp is the Poverty line, yi is the income of household i, q is the number of poor households, n is the number of households in the entire population. Suppose the Poverty line is $400 and there are four poor people with of a total population (n) of 10. The two rural poor people have $200 annual income and the two urban poor have $300. When = 0 and the FGT index p(0) equals the basic headcount measure of Poverty (H). When = 1 the FGT index p(1) is H*I, where I is the average income shortfall or (yp - y-)/yp where y- is the average income of the poor and again yp is the official Poverty line. When = 2 the FGT Poverty index or P(2) is the sum of the average income gaps squared. This implies the poorest have more weight in the Poverty index, so that if the government redistributes income to the poorest of the poor, the index p(2) falls most ( remember the neediest is the NY Times motto) The global standard for severe Poverty is 38/month or $ a day PPP in low income countries.

5 Middle income countries like Peru use $ per day or $76 per month as their severe Poverty line or $4-$5 per day for everyday or moderate Poverty line. Note that the Peruvian currency, the Nuevo Sol trades at about per dollar The PPP conversi n factor for Peru is about in other words a dollar in Peru (rural and urban) buy what a $ would buy in the United Stats. Files: This Stata file contains the 24,000 HHs in the 2011 survey: Do file program: Stata code clear * open the data use "D:\economic_research\r-software\fordham \sumaria2011", clear *set the data survey design svyset conglome [pw=facpob], strata(estrato) * monthly per capita expenditure National tabstat gpcm [aw=facpob], stats(mean semean sd n ) * mean of monthly percapita expenditure - extreme Poverty in local currency (soles) exchange rate = Soles/US$ * National tabstat linpe if (estrato>=1) [aw=facpob], stats(mean p50) * Urban tabstat linpe if (estrato<6) [aw=facpob], stats(mean p50) *Rural tabstat linpe if (estrato>=6) [aw=facpob], stats(mean p50) * mean of monthly percapita expenditure - Poverty in local currency (soles) exchange rate = Soles/US$ * National tabstat linea if (estrato>=1) [aw=facpob], stats(mean p50) * Urban tabstat linea if (estrato<6) [aw=facpob], stats(mean p50)

6 * Rural tabstat linea if (estrato>=6) [aw=facpob], stats(mean p50) * Extreme Poverty headcount * National sepov gpcm [w=facpob], povline(linea) * Urban sepov gpcm [w=facpob] if (estrato<6), povline(linea) * Rural sepov gpcm [w=facpob] if (estrato>=6), povline(linea) * Poverty headcount * National sepov gpcm [w=facpob], povline(linpe) * Urban sepov gpcm [w=facpob] if (estrato<6), povline(linpe) * Rural sepov gpcm [w=facpob] if (estrato>=6), povline(linpe) Stata Results 1. * monthly per capita expenditure - National tabstat gpcm [aw=facpob], stats(mean semean sd n ) variable | mean se(mean) sd N -------------+-------------------------- -------------- gpcm | 24809 ---------------------------------------- -------------- 2. * mean of monthly percapita expenditure - extreme Poverty in local currency (soles) exchange rate = Soles/US$.

7 * mean of monthly percapita expenditure - extreme Poverty in local currency (soles) exchange rate = Soles/US$ . * National . tabstat linpe if (estrato>=1) [aw=facpob], stats(mean semean p50) variable | mean se(mean) p50 -------------+-------------------------- ---- linpe | .1328722 ---------------------------------------- ---- . * Urban . tabstat linpe if (estrato<6) [aw=facpob], stats(mean semean p50) variable | mean se(mean) p50 -------------+------------------------------ linpe | .1561769 -------------------------------------------- . *Rural . tabstat linpe if (estrato>=6) [aw=facpob], stats(mean semean p50) variable | mean se(mean) p50 -------------+-------------------------- ---- linpe | .0161088 ---------------------------------------- ---- 3.

8 * mean of monthly percapita expenditure - Poverty in local currency (soles) exchange rate = Soles/US$ . * National . tabstat linea if (estrato>=1) [aw=facpob], stats(mean semean p50) variable | mean se(mean) p50 -------------+-------------------------- ---- linea | .3591983 ---------------------------------------- ---- . * Urban . tabstat linea if (estrato<6) [aw=facpob], stats(mean semean p50) variable | mean se(mean) p50 -------------+------------------------------ linea | .3693753 -------------------------------------------- . * Rural . tabstat linea if (estrato>=6) [aw=facpob], stats(mean semean p50) variable | mean se(mean) p50 -------------+-------------------------- ---- linea | .0766447 ---------------------------------------- ---- 4.

9 * Poverty headcount . * National . sepov gpcm [w=facpob], povline(linea) (sampling weights assumed) Poverty measures for the variable gpcm: (unlabeled) Survey mean estimation pweight: facpob Number of obs = 24809 Strata: <one> Number of strata = 1 PSU: <observations> Number of PSUs = 24809 Population size = 29943619 ---------------------------------------- -------------------------------------- Mean | Estimate Std. Err. [95% Conf. Interval] Deff ---------+------------------------------ -------------------------------------- p0 | .2782429 .00415 .2701086 .2863772 p1 | .0780467 .0014051.

10 0752928 .0808007 p2 | .0318401 .0007396 .0303904 .0332898 ---------------------------------------- -------------------------------------- . * Urban . sepov gpcm [w=facpob] if (estrato<6), povline(linea) (sampling weights assumed) Poverty measures for the variable gpcm: (unlabeled) Survey mean estimation pweight: facpob Number of obs = 15065 Strata: <one> Number of strata = 1 PSU: <observations> Number of PSUs = 15065 Population size = 22214450 ---------------------------------------- -------------------------------------- Mean | Estimate Std. Err. [95% Conf. Interval] Deff ---------+------------------------------ -------------------------------------- p0 |.


Related search queries