From cb9c930e85bb44c9e71ca48936aebc7b5ef02c39 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 24 Mar 2021 16:14:03 -0400 Subject: [PATCH] New synth program Adds pcn synth a program that creates the synthetic distribution for a given country-year --- lorenz_query.ado | 229 +++++++++++++++++++++++++++++++++ pcn.sthlp | 4 + pcn_synth.ado | 328 +++++++++++++++++++++++++++++++++++++++++++++++ pcn_synth.sthlp | 95 ++++++++++++++ 4 files changed, 656 insertions(+) create mode 100644 lorenz_query.ado create mode 100644 pcn_synth.ado create mode 100644 pcn_synth.sthlp diff --git a/lorenz_query.ado b/lorenz_query.ado new file mode 100644 index 0000000..cfb90e3 --- /dev/null +++ b/lorenz_query.ado @@ -0,0 +1,229 @@ +/*================================================== +project: Query data for lorenz curve +Author: David L. Vargas +E-email: dvaragsm@worldbank.org +url: +Dependencies: The World Bank +---------------------------------------------------- +Creation Date: 23 Jul 2020 +Modification Date: +Do-file version: 01 +References: +Output: +==================================================*/ + +/*================================================== +0: Program set up +==================================================*/ +program define lorenz_query, rclass +syntax [anything(name=subcommand)] , /// +COUNtry(string) /// +ppp(real) /// +[ /// +server(string) /// +LEvel(string) /// +POVLine(real 1.90) /// +Year(string) /// +] +version 14 + +qui { + *---------- conditions + + local str_opt "server country level" // A list of string options for some ease + + // set all to lower case + foreach optt of local str_opt{ + if ("``optt''"!="") local `optt' = lower("``optt''") + } + + // check the server, is it testing? + if ("`server'" == "testing"){ + local root "http://wbgmsrech001/povcalnet-testing" + } + else if ("`server'" == "int" | "`sever'" == "dev"){ + local root "http://wbgmsrech001/povcalnet" + } + else if ("`server'" == "ar"){ + local root "http://wbgmsrech001/PovcalNet-AR/api" + } + else{ + local root "http://iresearch.worldbank.org/PovcalNet" + } + + // check the datalevel - Urban or Rural + if (inlist("`level'","rural")) { + local lvl "1" + } + else { + local lvl "2" + local level "urban" + } + + local country = upper("`country'") + + /*================================================== + 1: define queery + ==================================================*/ + + local queery "`root'/Detail.aspx?Format=Detail&C0=`country'_`lvl'&PPP0=`ppp'&PL0=`povline'&Y0=`year'&NumOfCountries=1" + + /*================================================== + 1: queery data + ==================================================*/ + + // Next line for testing proposes + *loc queery"http://iresearch.worldbank.org/PovcalNet/Detail.aspx?Format=Detail&C0=IND_1&PPP0=14.9752&PL0=1.90&Y0=1983&NumOfCountries=1%22" + *loc queery "http://wbgmsrech001/povcalnet-AR/Detail.aspx?Format=Detail&C0=CHN_2&PPP0=3.0392219&PL0=1.9&Y0=1981&NumOfCountries=1" + *loc queery "http://wbgmsrech001/PovcalNet-AR/api/Detail.aspx?Format=Detail&C0=CHN_2&PPP0=3.0392219&PL0=1.9&Y0=1981&NumOfCountries=1" + + scalar page = fileread(`"`queery'"') + scalar page = subinstr(page, `"""', "",.) + + if regexm(page, "The server has encountered an error which prevents it from fulfilling your request.") { + noi di "Server error for `country' - `year' - `level'" + error + + } + /*================================================== + 1: Extract data + ==================================================*/ + + /***** Dataset information *****/ + if regexm(page, "Economy: ([A-Z|a-z]+)") scalar countryname = regexs(1) + if regexm(page, "Economy [a-z]ode: ([A-Z|a-z]+)") scalar country_code = regexs(1) + if regexm(page, "Data Year: ([0-9]+)") scalar year = regexs(1) + if regexm(page, "Coverage: ([A-Z|a-z]+)") scalar coverage = regexs(1) + if regexm(page, "Welfare measurement: ([A-Z|a-z]+)") scalar data_type = regexs(1) + if regexm(page, "Data source: ([A-Z|a-z]+_[A-Z|a-z|0-9]+)") scalar data_source = regexs(1) + + /***** General Quadratic Lorenz curve *****/ + if regexm(page, "Quadratic Lorenz curve(.+)Beta Lorenz curve") scalar GQ = regexs(1) + /***** Beta Lorenz curve *****/ + if regexm(page, "Beta Lorenz curve(.+)Final Result") scalar beta = regexs(1) + /***** Final result *****/ + if regexm(page, "Final Result(.+)") scalar final = regexs(1) + + /***** Extraction coefficients *****/ + + /** Lorenz curve **/ + foreach sec in GQ beta final { + // - coefficients - // + if regexm(`sec'," A[ ]+([0-9|\.|-]+)") scalar `sec'c_A = regexs(1) + if regexm(`sec'," B[ ]+([0-9|\.|-]+)") scalar `sec'c_B = regexs(1) + if regexm(`sec'," C[ ]+([0-9|\.|-]+)") scalar `sec'c_C = regexs(1) + + if ("`sec'" == "beta"){ + if regexm(`sec'," Theta:[ ]+([0-9|\.|-]+)") scalar `sec'_theta = regexs(1) + if regexm(`sec'," Gamma:[ ]+([0-9|\.|-]+)") scalar `sec'_gamma = regexs(1) + if regexm(`sec'," Delta:[ ]+([0-9|\.|-]+)") scalar `sec'_delta = regexs(1) + } + + // - summary - // + if regexm(`sec'," Mean:[ ]+([0-9|\.|-]+)") scalar `sec'_mean = regexs(1) + if regexm(`sec'," Validity of lorenz curve:[ ]+([A-Z|a-z]+)") scalar `sec'_validity = regexs(1) + if regexm(`sec'," Normality of poverty estimate:[ ]+([A-Z|a-z]+)") scalar `sec'_normal = regexs(1) + + // - Distributional Estimation - // + if regexm(`sec'," Gini index\(%\):[ ]+([0-9|\.|-]+)") scalar `sec'_gini = regexs(1) + if regexm(`sec'," median income\(or expenditure\):[ ]+([0-9|\.|-]+)") scalar `sec'_median = regexs(1) + if regexm(`sec'," MLD index:[ ]+([0-9|\.|-]+)") scalar `sec'_MLD = regexs(1) + if regexm(`sec'," polarization index\(%\):[ ]+([0-9|\.|-]+)") scalar `sec'_polar = regexs(1) + if regexm(`sec'," distribution corrected mean:[ ]+([0-9|\.|-]+)") scalar `sec'_dcmean = regexs(1) + if regexm(`sec'," mean income/expenditure of the poorest 50%:[ ]+([0-9|\.|-]+)") scalar `sec'_mean50 = regexs(1) + + // - Deciles - // + if regexm(`sec'," Decile \(%\) [-]+(.+)[-]+ P") scalar `sec'_deciles = regexs(1) + if regexm(`sec'_deciles,"([0-9][0-9|\.| ]+)") scalar `sec'_deciles = regexs(1) + loc i = 0 + foreach dc in `=scalar(GQ_deciles)'{ + loc ++i + scalar `sec'_dec_`i' = `dc' + } + + // - Poverty Estimates - // + if regexm(`sec'," Poverty line:[ ]+([0-9|\.|-]+)") scalar `sec'_povl = regexs(1) + if regexm(`sec'," Headcount\(HC\):[ ]+([0-9|\.|-]+)") scalar `sec'_hc = regexs(1) + if regexm(`sec'," Poverty gap \(PG\):[ ]+([0-9|\.|-]+)") scalar `sec'_povg = regexs(1) + if regexm(`sec'," PG squared \(FGT2\):[ ]+([0-9|\.|-]+)") scalar `sec'_povgsq = regexs(1) + if regexm(`sec'," Watt index:[ ]+([0-9|\.|-]+)") scalar `sec'_watt = regexs(1) + } + + /** Final **/ + if regexm(final,"Distributional estimates use[ ]+([A-Z|a-z]+) ") scalar fdise = regexs(1) + if regexm(final,"Poverty estimates use[ ]+([A-Z|a-z]+) ") scalar fpove = regexs(1) + + /*================================================== + 4: return values + ==================================================*/ + return local query = "`queery'" + + foreach s in countryname country_code coverage data_type data_source{ + return local `s' = "`=scalar(`s')'" + loc scalars = "`scalars' `s'" + } + + foreach s in year{ + return scalar `s' = `=scalar(`s')' + loc scalars = "`scalars' `s'" + } + + + foreach sec in GQ beta final{ + + if ("`sec'" != "final"){ + return scalar `sec'coeffA = `=scalar(`sec'c_A)' + return scalar `sec'coeffB = `=scalar(`sec'c_B)' + return scalar `sec'coeffC = `=scalar(`sec'c_C)' + loc scalars = "`scalars' `sec'coeffA `sec'coeffB `sec'coeffC" + } + + if ("`sec'" == "beta"){ + return scalar `sec'theta = `=scalar(`sec'_theta)' + return scalar `sec'delta = `=scalar(`sec'_delta)' + return scalar `sec'gamma = `=scalar(`sec'_gamma)' + loc scalars = "`scalars' `sec'theta `sec'delta `sec'gamma" + } + + return scalar `sec'mean = `=scalar(`sec'_mean)' + return local `sec'validity = "`=scalar(`sec'_validity)'" + return local `sec'normality = "`=scalar(`sec'_normal)'" + return scalar `sec'gini = `=scalar(`sec'_gini)' + return scalar `sec'median = `=scalar(`sec'_median)' + return scalar `sec'mld = `=scalar(`sec'_MLD)' + return scalar `sec'polarization = `=scalar(`sec'_polar)' + return scalar `sec'mean_bottomhalf = `=scalar(`sec'_mean50)' + + forv i = 1/10{ + return scalar `sec'decile`i' = `=scalar(`sec'_dec_`i')' + loc scalars = "`scalars' `sec'decile`i'" + } + + return scalar `sec'povertyline = `=scalar(`sec'_povl)' + return scalar `sec'headcount = `=scalar(`sec'_hc)' + return scalar `sec'povertygap = `=scalar(`sec'_povg)' + return scalar `sec'pgsqd = `=scalar(`sec'_povgsq)' + return scalar `sec'watt = `=scalar(`sec'_watt)' + + // local with a list of the scalars + loc scalars = "`scalars' `sec'mean `sec'validity `sec'normality `sec'gini `sec'median `sec'mld `sec'polarization `sec'mean_bottomhalf `sec'povertyline `sec'headcount `sec'povertygap `sec'pgsqd `sec'watt" + } + + + return local distestimate = "`=scalar(fdise)'" + return local povestimate = "`=scalar(fpove)'" + return scalar ppp = `ppp' + loc scalars = "`scalars' distestimate povestimate ppp" + + return local returned "`scalars'" + +} // end qui + + +end +exit +/* End of do-file */ + +/* some testing +lorenz_query, country(CHN) year(2002) ppp(3.69611) level(rural) +return list \ No newline at end of file diff --git a/pcn.sthlp b/pcn.sthlp index cc310ed..27d7ee3 100644 --- a/pcn.sthlp +++ b/pcn.sthlp @@ -60,6 +60,10 @@ {c |} 8. To load or create production vintages, see:{col 68}{c |} {c |} {bf:{help pcn_production:[PCN] pcn production}}{col 68}{c |} {c |}{col 68}{c |} + {c |}{col 68}{c |} + {c |} 9. To generate synthetic distributions, see:{col 68}{c |} + {c |} {bf:{help pcn_synth:[PCN] pcn synth}}{col 68}{c |} + {c |}{col 68}{c |} {c |} Or check out the {bf:{help pcn_full:pcn full help file}}{col 68}{c |} {c |}{col 68}{c |} {c BLC}{hline 62}{c BRC} diff --git a/pcn_synth.ado b/pcn_synth.ado new file mode 100644 index 0000000..07b45f3 --- /dev/null +++ b/pcn_synth.ado @@ -0,0 +1,328 @@ +/*================================================== +project: create synthetic files +Author: David L. Vargas +E-email: dvaragsm@worldbank.org +url: +Dependencies: The World Bank +---------------------------------------------------- +Creation Date: March 2020 +Modification Date: +Do-file version: 01 +References: +Output: +==================================================*/ + +/*================================================== +0: Program set up +==================================================*/ +program define pcn_synth, rclass +syntax [anything(name=subcommand)] , /// +COUNtry(string) /// +Year(string) /// +[ /// +platform(string) /// +ppp(string) /// +pppyear(string) /// +natppp /// +server(string) /// +POVLine(real 1.90) /// +SObs(integer 100000) /// +addvar(string) /// +allvars /// +version(string) /// +] +version 14 + +qui { +drop _all + + *---------- conditions + + // -- country -- // + loc country = upper("`country'") + + // check number of year and country make senses + if (wordcount("`country'") != 1){ + noi di as error "Only one country can be set at a time" + error + } + if (wordcount("`year'") != 1){ + noi di as error "only one year can be set at a time" + error + } + + // ppp year + if ("`pppyear'" == "") loc pppyear = "2011" + + // lorenz query options + if ("`server'" != "") loc servercall = "server(`server')" + if ("`povline'" != "") loc povlinecall = "povline(`povline')" + + /*================================================== + 1: get ppp - population + ==================================================*/ + + if ("`ppp'" == "") loc ivs "ppp population" + else if ("`natppp'" != "") loc ivs "population" + else loc ivs "population" + + if ("`platform'" == "pcn"){ + foreach iv in `ivs'{ + pcn master, load(`iv') version(`version') + + keep if inlist(countrycode, "`country'") + drop if coveragetype == "National" + + if ("`iv'" == "ppp"){ + rename ppp`pppyear' ppp + } + else { + if ("`iv'" == "population" & "`country'" == "IND" & "`year'" == "1987"){ + keep if inlist(year, 1987, 1988) + tempvar _temp + bys coveragetype: egen `_temp' = mean(population) + replace population = `_temp' + } + + keep if year == `year' + + } + + keep countrycode coveragetype `iv' + + levelsof coveragetype if countrycode == "`country'", local(cover) + foreach cv of local cover{ + levelsof `iv' if countrycode == "`country'" & coveragetype == "`cv'", local(val) + loc cvl = substr("`cv'", 1,1) + scalar `iv'_`cvl' = `val' + } + } + + // if national PPPs + if ("`natppp'" != ""){ + pcn master, load(ppp) version(`version') + + keep if inlist(countrycode, "`country'") + keep if coveragetype == "National" + rename ppp`pppyear' ppp + keep countrycode coveragetype ppp + + foreach cv of local cover{ + levelsof ppp if countrycode == "`country'", local(val) + loc cvl = substr("`cv'", 1,1) + scalar ppp_`cvl' = `val' + } + + } + + drop _all + } + else{ + loc ivs = subinstr("`ivs'", "population", "pop", .) + foreach iv in `ivs'{ + pip_aux_load, load(`iv') version(`version') clear + drop if `iv' == . + tostring `iv'_domain, replace + tostring `iv'_data_level, replace + drop if `iv'_domain == "1" // drop if national + keep if inlist(country_code, "`country'") + + if ("`iv'" == "pop") loc ivn "population" + else loc ivn "`iv'" + + if ("`iv'" == "ppp"){ + keep if ppp_default == 1 + } + else { + if ("`iv'" == "pop" & "`country'" == "IND" & "`year'" == "1987"){ + keep if inlist(year, 1987, 1988) + tempvar _temp + bys `iv'_data_level: egen `_temp' = mean(pop) + replace pop = `_temp' + } + + keep if year == `year' + } + + keep country_code `iv'_data_level `iv'_domain `iv' + + // this should be tiddier from data ask A.C. + cap replace `iv'_data_level = "rural" if `iv'_data_level == "0" + cap replace `iv'_data_level = "urban" if `iv'_data_level == "1" + + levelsof `iv'_data_level if country_code == "`country'", local(cover) + foreach cv of local cover{ + levelsof `iv' if country_code == "`country'" & `iv'_data_level == "`cv'", local(val) + loc cvl = substr("`cv'", 1,1) + scalar `ivn'_`cvl' = `val' + } + } + + // if national PPPs + if ("`natppp'" != ""){ + pipdp_aux_load, load(ppp) version(`version') clear + drop if ppp == . + keep if inlist(country_code, "`country'") + keep if ppp_default == 1 + keep country_code ppp_data_level ppp + + keep if ppp_data_level == "national" + + *levelsof ppp_data_level if country_code == "`country'", local(cover) + foreach cv of local cover{ + levelsof ppp if country_code == "`country'", local(val) + loc cvl = substr("`cv'", 1,1) + scalar ppp_`cvl' = `val' + } + } + + drop _all + } + + /*================================================== + 3: query lorenz parameters + ==================================================*/ + foreach cv of local cover{ + loc cvl = substr("`cv'", 1,1) // level_sufix + + if ("`ppp'" != "") scalar ppp_`cvl' = `ppp' + + // Actual query + cap lorenz_query, country(`country') year(`year') /// + ppp(`=scalar(ppp_`cvl')') level(`cv') /// + `servercall' `povlinecall' + + if _rc { + noi di as error "Error while querying data from the server" + error + } + + // parameters store + foreach v in `r(returned)'{ + scalar `v'_`cvl' = "`r(`v')'" + } + + loc parameters = "`r(returned)'" + + } + + /*================================================== + 4: Slope parameters + ==================================================*/ + foreach cv of local cover{ + loc cvl = substr("`cv'", 1,1) // level_sufix + + // - Create parameters to calculate the slope of the GQ lorenz curve + scalar e_`cvl' = -(`=scalar(GQcoeffA_`cvl')' + `=scalar(GQcoeffB_`cvl')' + `=scalar(GQcoeffC_`cvl')' + 1) + scalar m_`cvl' = (`=scalar(GQcoeffB_`cvl')')^2 - 4*`=scalar(GQcoeffA_`cvl')' + scalar n_`cvl' =2*`=scalar(GQcoeffB_`cvl')'*`=scalar(e_`cvl')'-4*`=scalar(GQcoeffC_`cvl')' + scalar r_`cvl' =((`=scalar(n_`cvl')')^2-4*`=scalar(m_`cvl')'*((`=scalar(e_`cvl')')^2))^(0.5) + + // - Convert GQ mean from monthly to daily + scalar GQmean_`cvl' = `=scalar(GQmean_`cvl')' * 12 / 365 + scalar betamean_`cvl' = `=scalar(betamean_`cvl')' * 12 / 365 + } + + /*================================================== + 5: Simulation + ==================================================*/ + + // --- simulation by coveragetype --- // + foreach cv of local cover{ + + // cumulative distribution + clear + set type double + set seed 12345 + + scalar nobs=100000 + scalar first=1/(2*`=nobs') + scalar last=1-(1/(2*`=nobs')) + set obs `=nobs' + range _F `=first' `=last' + + + loc cvl = substr("`cv'", 1,1) // level_sufix + tempfile simul_`cvl' + + //-- vars form lorenz query --// + gen countrycode = "`=scalar(country_code_`cvl')'" + gen year = `=scalar(year_`cvl')' + gen coveragetype = "`=scalar(coverage_`cvl')'" + gen distestimate = "`=scalar(distestimate_`cvl')'" + + // -- Slope calulations -- // + + ** Calculate the slope of GQ lorenz curve and income (= mu * slope of LC) + gen double x_F_GQ = `=scalar(GQmean_`cvl')'*(-(`=scalar(GQcoeffB_`cvl')')/2 -(2*`=scalar(m_`cvl')'*(_F)+`=scalar(n_`cvl')')*(`=scalar(m_`cvl')'*(_F)^2+`=scalar(n_`cvl')'*(_F)+(`=scalar(e_`cvl')')^2)^(-0.5)/4) + + * Calculate the slope of beta lorenz curve and income (= mu * slope of LC) + gen double x_F_beta = `=scalar(betamean_`cvl')'*(1-`=scalar(betatheta_`cvl')'*((_F)^`=scalar(betagamma_`cvl')')*((1-(_F))^`=scalar(betadelta_`cvl')')*((`=scalar(betagamma_`cvl')'/(_F)) - (`=scalar(betadelta_`cvl')'/(1-(_F))))) + + // -- Add population -- // + gen population = `=scalar(population_`cvl')'*10 + + save `simul_`cvl'', replace + } + + // append simulations + clear + loc i = 0 + foreach cv of local cover{ + loc cvl = substr("`cv'", 1,1) // level_sufix + loc ++i + if ("`i'" == "1") use `simul_`cvl'', clear + else append using `simul_`cvl'' + } + + // destring + destring, replace + + // -- Define welfare -- // + gen double welfare = . + replace welfare = x_F_GQ if distestimate == "GQ" + replace welfare = x_F_beta if distestimate == "Beta" + + // -- keep only welfare and weights -- // + if ("`allvars'" == ""){ + keep welfare population `addvar' + } + rename population weight + + + + /*========================================= + 6. return parameters + ==========================================*/ + + // parameters store + foreach v in `parameters' { + foreach cv of local cover{ + loc cvl = substr("`cv'", 1,1) + cap confirm number `v'_`cvl' + if _rc{ + return local `v'_`cvl' = "`=scalar(`v'_`cvl')'" + } + else{ + return scalar `v'_`cvl' = `=scalar(`v'_`cvl')' + } + } + } + + + + + /*local filename = "`country'_`year'" + return local survin = "`country'_`year'_synth" + return local survid = "`country'_`year'_synth" + return local survey_id = "`country'_`year'_synth" + return local surdir = "P:/01.PovcalNet/01.Vintage_control/`country'/`country'_`year'_synth" + */ +} // end qui +end +exit +/* End of do-file */ + +* some testing */ + +*synth_distribution, country(CHN) year(2002) \ No newline at end of file diff --git a/pcn_synth.sthlp b/pcn_synth.sthlp new file mode 100644 index 0000000..70b84f3 --- /dev/null +++ b/pcn_synth.sthlp @@ -0,0 +1,95 @@ +{smcl} +{* *! version 1.0.0 15march2021}{...} +{cmd:help pcn_synth} {right: WB:PovcalNet Team}{* {right: ({browse "some link":SJ: ???})}} +{hline} +{center: Inequality Synthetics - pcn_synth} +{hline} + +{p2colset 10 17 16 2}{...} +{p2col:{cmd:pcn_synth}}PIP command to create synthetic distributions{p_end} + +{p 4 4 2}{bf:{ul:Description (short)}}{p_end} +{p 4 4 2} +The {cmd:pcn_synth} command, allows Stata users to generate synthetic distributions using povcalnet's fitted lorenz curves{p_end} + +{hline} + +{marker description}{...} +{title:Description} + +{pstd} +The {cmd:pcn_synth} command allows Stata users to +generate with synthetic distributions using povcalnet's fitted lorenz curves{p_end} + +{center:(Go up to {it:{help pcn_synth##sections:Sections Menu}})} + + +{marker syntax}{...} +{title:Overall Syntax} + +{p 4 4 2} +The {cmd:pcn_synth} subcommand syntax is as follows:{p_end} + +{p 8 17 2} +{cmdab:pcn_synth:} {cmd:,} {opt country(3-letter code)} {opt year(numlist)} [parameters options] + +{p 4 4 2} +The different options and parameters may be described: + +{col 5}Option{col 30}Description +{space 4}{hline} + +{p2col:{opt country(3-letter code):}} Single 3-letter code.{p_end} +{p2col:{opt pppyear(####):}} PPP year to be used. [povcalnet]{p_end} +{p2col:{opt ppp(real):}} PPP to be used.{p_end} +{p2col:{opt natppp:}}[selected subcommands] Uses national PPPs insted of urban and rural.{p_end} +{p2col:{opt year(numlist):}} Years to query. A numlist per country is allowed, they must be separared by a comma ","{p_end} +{p2col:{opt povline(real):}} Poverty line to be used.{p_end} +{p2col:{opt level(string):}} Call a particular level: urban or rural{p_end} +{p2col:{opt server(string):}}[Only for povcalnet] PovcalNet server to be used.{p_end} +{p2col:{opt platform(string):}}Platform used to get ppp and population numbers. Either "pcn" or "pip". Default "pip"{p_end} +{p2col:{opt SO:bs(integer):}}Number of observations per level. Default 100,000{p_end} +{p2col:{opt addvar(varlist):}}Keep an set of additional variables{p_end} +{p2col:{opt allvars:}}Keep all additional variables{p_end} +{p2col:{opt version:(string)}} [pcn only] PPP and population data vintage to be used{p_end} +{space 4}{hline} +{p 4 4 2} + +{center:{hline 16}} +{center:{bf:Examples}} +{center:{hline 16}} + +{p 4 4 2} +{bf: Note: pcn_synth} requires {help missings:missings}, {help pcn:pcn} +and/or {help pip:pip}. [Notice: {help datalibweb:datalibweb} +may require World Bank internal resources] + +{p 4 4 2} +One of the most simple queries possible is only setting a country and a ppp:{p_end} + +{phang2} +{stata pcn_synth, countries(CHN) years(1981) natppp} + +{p 4 4 2} +A pcn query:{p_end} + +{phang2} +{stata pcn_synth, countries(CHN) years(1981) platform(pcn) addvar(coveragetype) natppp} + +{center:(Go up to {it:{help pcn_synth##sections:Sections Menu}})} +{center:(Go up to {it:{help pcn_synth##sections:Sections Menu}})} + + +{marker contact}{...} +{title:Contact} +{pstd} +Any comments, suggestions, or bugs can be reported in the +{browse "https://github.com/worldbank/pipdp_synth_unique/issues":GitHub issues page}. +All the files are available in the {browse "https://github.com/worldbank/pipdp_synth_unique":GitHub repository} + +{title:Author} +{p 4 4 4}R.Andres Castaneda, The World Bank{p_end} +{p 6 6 4}Email {browse "acastanedaa@worldbank.org":acastanedaa@worldbank.org}{p_end} +{p 6 6 4}GitHub: {browse "https://github.com/randrescastaneda":randrescastaneda }{p_end} + +{title:Maintainer} \ No newline at end of file