diff --git a/reference/sum_up_to_one.html b/reference/sum_up_to_one.html
index be9df3a..89dd8b5 100644
--- a/reference/sum_up_to_one.html
+++ b/reference/sum_up_to_one.html
@@ -24,6 +24,12 @@
diff --git a/search.json b/search.json
index 2ef66f4..8ec1197 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"https://pip-technical-team.github.io/pipster/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 pipster authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://pip-technical-team.github.io/pipster/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"R.Andres Castaneda. Author, maintainer.","code":""},{"path":"https://pip-technical-team.github.io/pipster/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Castaneda R (2024). pipster: Package (One Line, Title Case). R package version 0.0.0.9002, https://pip-technical-team.github.io/pipster/.","code":"@Manual{, title = {pipster: What the Package Does (One Line, Title Case)}, author = {R.Andres Castaneda}, year = {2024}, note = {R package version 0.0.0.9002}, url = {https://pip-technical-team.github.io/pipster/}, }"},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"pipster","dir":"","previous_headings":"","what":"What the Package Does (One Line, Title Case)","title":"What the Package Does (One Line, Title Case)","text":"goal pipster make use wbpip functions easily.","code":""},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"What the Package Does (One Line, Title Case)","text":"can install development version pipster GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"PIP-Technical-Team/pipster\") library(pipster) library(collapse) #> Warning: package 'collapse' was built under R version 4.3.2 #> collapse 2.0.7, see ?`collapse-package` or ?`collapse-documentation` #> #> Attaching package: 'collapse' #> The following object is masked from 'package:stats': #> #> D ## basic example code"},{"path":[]},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"group-data","dir":"","previous_headings":"Identify type of data","what":"Group Data","title":"What the Package Does (One Line, Title Case)","text":"","code":"# W: Weights, share of population, sum up to 100 # X: welfare vector with mean welfare by decile # P:Cumulative share of population # L: Cumulative share of welfare # R: share of welfare, sum up to 1. W = c(0.92, 2.47, 5.11, 7.9, 9.69, 15.24, 13.64, 16.99, 10, 9.78, 3.96, 1.81, 2.49) X = c(24.84, 35.8, 45.36, 55.1, 64.92, 77.08, 91.75, 110.64, 134.9, 167.76, 215.48, 261.66, 384.97) P = c(0.0092, 0.0339, 0.085, 0.164, 0.2609, 0.4133, 0.5497, 0.7196, 0.8196, 0.9174, 0.957, 0.9751, 1) L = c(0.00208, 0.01013, 0.03122, 0.07083, 0.12808, 0.23498, 0.34887, 0.51994, 0.6427, 0.79201, 0.86966, 0.91277, 1) R = (W * X) / sum(W * X) # type 1 ------ ## up to 1 --------- identify_pip_type(welfare = L, weight = P) #> [1] \"gd_1\" ## up to 100 --------- identify_pip_type(welfare = L*100, weight = P) #> [1] \"gd_1\" # type 2 ----------- ## up to 1 ----------- identify_pip_type(welfare = R, weight = W/100) #> ! vectors not sorted #> [1] \"gd_2\" ## up to 100 --------- identify_pip_type(welfare = R*100, weight = W) #> ! vectors not sorted #> [1] \"gd_2\" # type 5 ----------- identify_pip_type(welfare = X, weight = W/100) #> [1] \"gd_5\" # type 3 ----------- identify_pip_type(welfare = X, weight = P) #> [1] \"gd_3\""},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"microdata","dir":"","previous_headings":"Identify type of data","what":"Microdata","title":"What the Package Does (One Line, Title Case)","text":"","code":"# l: length # Y: welfare # Q: population or weights # I: imputation ID l <- 300 Y <- sample(1000, l,replace = TRUE) Q <- sample(35, l,replace = TRUE) I <- sample(1:5, l,replace = TRUE) identify_pip_type(welfare = Y, weight = Q) #> ! vectors not sorted #> [1] \"md\" identify_pip_type(welfare = Y, weight = Q, imputation_id = I) #> ! vectors not sorted #> [1] \"id\" I2 <- rep(1, l) identify_pip_type(welfare = Y, weight = Q, imputation_id = I2) #> ! vectors not sorted #> [1] \"md\""},{"path":[]},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"group-data-1","dir":"","previous_headings":"Convert to PIP format","what":"Group Data","title":"What the Package Does (One Line, Title Case)","text":"Convert Group Data Type-2 Group Data Type-1 . Notice whole dataframe parsed function need whole dataframe back. enough parsing just welfare weight vetors.","code":"pip_gd |> fselect(R,W) #> R W #> 1 0.002079692 0.92 #> 2 0.008047104 2.47 #> 3 0.021093739 5.11 #> 4 0.039613054 7.90 #> 5 0.057248211 9.69 #> 6 0.106902117 15.24 #> 7 0.113888553 13.64 #> 8 0.171066582 16.99 #> 9 0.122764156 10.00 #> 10 0.149309315 9.78 #> 11 0.077653634 3.96 #> 12 0.043099829 1.81 #> 13 0.087234016 2.49 gd <- as_pip(dt = pip_gd, welfare_var = \"R\", weight_var = \"W\", pip_type = \"gd_2\") #> i columns \"welfare\" and \"W\" have been rescaled to range (0,1] gd |> fselect(R,W) #> R W #> 1: 0.002079692 0.0092 #> 2: 0.010126796 0.0339 #> 3: 0.031220536 0.0850 #> 4: 0.070833589 0.1640 #> 5: 0.128081800 0.2609 #> 6: 0.234983917 0.4133 #> 7: 0.348872469 0.5497 #> 8: 0.519939051 0.7196 #> 9: 0.642703207 0.8196 #> 10: 0.792012522 0.9174 #> 11: 0.869666156 0.9570 #> 12: 0.912765984 0.9751 #> 13: 1.000000000 1.0000 class(gd) #> [1] \"pipgd\" \"data.table\" \"data.frame\""},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"micro-data","dir":"","previous_headings":"Convert to PIP format","what":"Micro Data","title":"What the Package Does (One Line, Title Case)","text":"","code":"md <- as_pip(dt = pip_md, welfare_var = \"welfare\", weight_var = \"weight\") #> ! vectors not sorted #> > PIP type identified: \"md\" waldo::compare(md, roworderv(pip_md, \"welfare\")) #> `class(old)`: \"pipmd\" \"data.table\" \"data.frame\" #> `class(new)`: \"tbl_df\" \"tbl\" \"data.frame\""},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":null,"dir":"Reference","previous_headings":"","what":"add PIP class — add_pip_class","title":"add PIP class — add_pip_class","text":"add PIP class","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"add PIP class — add_pip_class","text":"","code":"add_pip_class(x, pip_type)"},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"add PIP class — add_pip_class","text":"x data frame pip_type character: One \"md\", \"id\", \"gd_*\". Generally comes output identify_pip_type()","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"add PIP class — add_pip_class","text":"data frame pip class","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert to PIP format and add class — as_pip","title":"Convert to PIP format and add class — as_pip","text":"Convert welfare, weight (optionally) imputed id vectors PIP format data.frame","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert to PIP format and add class — as_pip","text":"","code":"as_pip( dt, welfare_var, weight_var, imputation_id_var = NULL, pip_type = NULL, groupdata_threshold = getOption(\"pipster.gd_threshold\"), verbose = getOption(\"pipster.verbose\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert to PIP format and add class — as_pip","text":"dt data.frame welfare data welfare_var character: variable name welfare vector dt weight_var character: variable name weight vector dt imputation_id_var character: variable name imputation ID vector dt pip_type character: One \"md\", \"id\", \"gd_*\". Generally comes output identify_pip_type() groupdata_threshold numeric: threshold discriminate micro data group data. Default 200 observations verbose logical: Whether display important messages data query","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert to PIP format and add class — as_pip","text":"data.frame","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert to PIP format and add class — as_pip","text":"","code":"as_pip(dt = pip_md, welfare_var = \"welfare\", weight_var = \"weight\") |> class() #> ! vectors not sorted #> → PIP type identified: \"md\" #> [1] \"pipmd\" \"data.table\" \"data.frame\""},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Check parameters of get_gd functions — check_pipgd_params","title":"Check parameters of get_gd functions — check_pipgd_params","text":"Check parameters get_gd functions","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check parameters of get_gd functions — check_pipgd_params","text":"","code":"check_pipgd_params(lp)"},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check parameters of get_gd functions — check_pipgd_params","text":"lp list parameters","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check parameters of get_gd functions — check_pipgd_params","text":"invisible TRUE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert vectors to microdata data PIP format — convert_to_pip_md","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"Convert vectors microdata data PIP format","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"","code":"convert_to_pip_md( dt, welfare_var, imputation_id_var, verbose = getOption(\"pipster.verbose\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"dt data.frame welfare data welfare_var character: variable name welfare vector dt imputation_id_var character: variable name imputation ID vector dt verbose logical: Whether display important messages data query","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"dataframe","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify PIP type — identify_pip_type","title":"Identify PIP type — identify_pip_type","text":"Based welfare weight vectors identifies whether data microdata, group data imputed data","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify PIP type — identify_pip_type","text":"","code":"identify_pip_type( welfare, weight = rep(1, length(welfare)), imputation_id = NULL, groupdata_threshold = getOption(\"pipster.gd_threshold\"), verbose = getOption(\"pipster.verbose\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify PIP type — identify_pip_type","text":"welfare numeric: welfare variable, either income consumption weight numeric: expansion sample weighs. Default vector o 1s length welfare imputation_id numeric: vector identifies different imputations. Default NULL groupdata_threshold numeric: threshold discriminate micro data group data. Default 200 observations verbose logical: Whether display important messages data query","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify PIP type — identify_pip_type","text":"character length 1.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify PIP type — identify_pip_type","text":"","code":"# Group data ------- # W: Weights, share of population, sum up to 100 # X: welfare vector with mean welfare by decile # P:Cumulative share of population # L: Cumulative share of welfare # R: share of welfare, sum up to 1. W = c(0.92, 2.47, 5.11, 7.9, 9.69, 15.24, 13.64, 16.99, 10, 9.78, 3.96, 1.81, 2.49) X = c(24.84, 35.8, 45.36, 55.1, 64.92, 77.08, 91.75, 110.64, 134.9, 167.76, 215.48, 261.66, 384.97) P = c(0.0092, 0.0339, 0.085, 0.164, 0.2609, 0.4133, 0.5497, 0.7196, 0.8196, 0.9174, 0.957, 0.9751, 1) L = c(0.00208, 0.01013, 0.03122, 0.07083, 0.12808, 0.23498, 0.34887, 0.51994, 0.6427, 0.79201, 0.86966, 0.91277, 1) R = (W * X) / sum(W * X) ## type 1 ------ identify_pip_type(welfare = L, weight = P) #> [1] \"gd_1\" identify_pip_type(welfare = L*100, weight = P) #> [1] \"gd_1\" ## type 2 ----------- identify_pip_type(welfare = R, weight = W/100) #> ! vectors not sorted #> [1] \"gd_2\" identify_pip_type(welfare = R*100, weight = W) #> ! vectors not sorted #> [1] \"gd_2\" ## type 5 ----------- identify_pip_type(welfare = X, weight = W/100) #> [1] \"gd_5\" identify_pip_type(welfare = X, weight = W) #> [1] \"gd_5\" ## type 3 ----------- identify_pip_type(welfare = X, weight = P) #> [1] \"gd_3\" identify_pip_type(welfare = X, weight = P*100) #> [1] \"gd_3\" # Microdata ------- l <- 300 Y <- sample(1000, l,replace = TRUE) Q <- sample(35, l,replace = TRUE) I <- sample(1:5, l,replace = TRUE) identify_pip_type(welfare = Y, weight = Q) #> ! vectors not sorted #> [1] \"md\" identify_pip_type(welfare = Y, weight = Q, imputation_id = I) #> ! vectors not sorted #> [1] \"id\""},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether the vector is cumulative up to 1 — is_cumulative","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"Check whether vector cumulative 1","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"","code":"is_cumulative(x, digits = 8)"},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"x numeric: vector whose elements might cumulative 1 digits numeric: number digits cumulative sum threshold. Default 8 decimals","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"logical","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_gd — pip_gd","title":"pip_gd — pip_gd","text":"PIP Group Data example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_gd — pip_gd","text":"","code":"pip_gd"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_gd — pip_gd","text":"grouped data frame five variables: W Weights, share population, sum 100 X welfare vector mean welfare decile P Cumulative share population L Cumulative share welfare R share welfare, sum 1","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"pip_gd — pip_gd","text":"Datt, Gaurav. 1998. “Computational Tools Poverty Measurement Analysis.” http://ebrary.ifpri.org/utils/getfile/collection/p15738coll2/id/125673/filename/125704.pdf, downloaded 2023-07-18 details, see https://datanalytics.worldbank.org/PIP-Methodology/welfareaggregate.html#tgd","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_id.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_id — pip_id","title":"pip_id — pip_id","text":"PIP imputed data example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_id — pip_id","text":"","code":"pip_id"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_id.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_id — pip_id","text":"imputed data frame three variables: welfare welfare (income consumption) weight population weights imputation_id Imputation ID","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_md — pip_md","title":"pip_md — pip_md","text":"PIP microdata example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_md — pip_md","text":"","code":"pip_md"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_md — pip_md","text":"microdata frame two variables: welfare welfare (income consumption) weight population weights","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md_s.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_md_s — pip_md_s","title":"pip_md_s — pip_md_s","text":"Small PIP microdata example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md_s.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_md_s — pip_md_s","text":"","code":"pip_md_s"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md_s.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_md_s — pip_md_s","text":"100 obs microdata frame two variables: welfare welfare (income consumption) weight population weights","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Group Data Parameters — pipgd_params","title":"Get Group Data Parameters — pipgd_params","text":"Get Parameters key values derived quadratic Beta Lorenz parametrization. welfare population must vectors group data dataset","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Group Data Parameters — pipgd_params","text":"","code":"pipgd_params(welfare, weight, mean = NULL, population = NULL)"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Group Data Parameters — pipgd_params","text":"welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL population numeric scalar actual size population. Default NULL","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Group Data Parameters — pipgd_params","text":"list Group data parameters parameters","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Group Data Parameters — pipgd_params","text":"Datt, G. 1998. \"Computational Tools Poverty Measurement Analysis\". FCND Discussion Paper 50. World Bank, Washington, DC. Krause, M. 2013. \"Corrigendum Elliptical Lorenz curves\". Journal Econometrics 174 (1): 44. Villasenor, J., B. C. Arnold. 1989. \"Elliptical Lorenz curves\". Journal Econometrics 40 (2): 327-338.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Group Data Parameters — pipgd_params","text":"","code":"# Get Lorenz parameters res <- pipgd_params( welfare = pip_gd$L, weight = pip_gd$P) str(res) #> List of 2 #> $ gd_params:List of 2 #> ..$ lq:List of 2 #> .. ..$ reg_results:List of 7 #> .. .. ..$ ymean: num 0.122 #> .. .. ..$ sst : num 0.0846 #> .. .. ..$ coef : Named num [1:3] 0.888 -1.451 0.203 #> .. .. .. ..- attr(*, \"names\")= chr [1:3] \"A\" \"B\" \"C\" #> .. .. ..$ sse : num 3.42e-06 #> .. .. ..$ r2 : num 1 #> .. .. ..$ mse : num 3.8e-07 #> .. .. ..$ se : num [1:3] 0.00667 0.01903 0.01283 #> .. ..$ key_values :List of 6 #> .. .. ..$ e : num -0.639 #> .. .. ..$ m : num -1.44 #> .. .. ..$ n : num 1.04 #> .. .. ..$ r : num 1.86 #> .. .. ..$ s1: num -0.281 #> .. .. ..$ s2: num 1 #> ..$ lb:List of 2 #> .. ..$ reg_results:List of 7 #> .. .. ..$ ymean: num -2.5 #> .. .. ..$ sst : num 11 #> .. .. ..$ coef : Named num [1:3] 0.561 0.931 0.58 #> .. .. .. ..- attr(*, \"names\")= chr [1:3] \"A\" \"B\" \"C\" #> .. .. ..$ sse : num 0.0032 #> .. .. ..$ r2 : num 1 #> .. .. ..$ mse : num 0.000356 #> .. .. ..$ se : num [1:3] 0.01487 0.00551 0.00641 #> .. ..$ key_values : logi NA #> $ data :List of 2 #> ..$ welfare: num [1:13] 0.00208 0.01013 0.03122 0.07083 0.12808 ... #> .. ..- attr(*, \"label\")= chr \"Cumulative share of welfare\" #> ..$ weight : num [1:13] 0.0092 0.0339 0.085 0.164 0.2609 ... #> .. ..- attr(*, \"label\")= chr \"Cumulative share of population\" #> - attr(*, \"class\")= chr \"pipgd_params\""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty gap (FGT1) — pipgd_pov_gap","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"Estimate poverty gap (FGT1)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"","code":"pipgd_pov_gap( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), format = c(\"dt\", \"list\", \"atomic\"), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value format character: either \"dt\" data.table, \"list\" \"atomic\" single numeric vector, whose names corresponding selected Lorenz value. Default \"dt\" lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"list poverty gaps. See format parameter","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"","code":"pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, mean = 109.90, povline = 89, complete = FALSE) #> povline pov_gap lorenz #> 1: 89 0.1247467 lq # Return data.table pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), complete = FALSE) #> povline pov_gap lorenz #> 1: 0.5 0.02322722 lq #> 2: 1.0 0.20434633 lq #> 3: 2.0 0.52347496 lq #> 4: 3.0 0.67167363 lq # Return list pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\") #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.02322722 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.2043463 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.523475 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.6716736 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return list complete pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\", complete = TRUE) #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.02322722 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.2043463 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.523475 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.6716736 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return data.table pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"atomic\", complete = FALSE) #> lq lq lq lq #> 0.02322722 0.20434633 0.52347496 0.67167363"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"function vectorized. Use pipgd_pov_gap instead","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"","code":"pipgd_pov_gap_nv( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"numeric poverty gap value","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"Estimate poverty headcount (FGT0)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"","code":"pipgd_pov_headcount( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), format = c(\"dt\", \"list\", \"atomic\"), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value format character: either \"dt\" data.table, \"list\" \"atomic\" single numeric vector, whose names corresponding selected Lorenz value. Default \"dt\" lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"list numeric vector. Check format argument","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"","code":"pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, mean = 109.90, povline = 89, complete = FALSE) #> povline headcount lorenz #> 1: 89 0.4506148 lq # Return data.table pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), complete = FALSE) #> povline headcount lorenz #> 1: 0.5 0.1354142 lq #> 2: 1.0 0.6284604 lq #> 3: 2.0 0.9430035 lq #> 4: 3.0 0.9830843 lq # Return list pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\") #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return list complete pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\", complete = TRUE) #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return data.table pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"atomic\", complete = FALSE) #> lq lq lq lq #> 0.1354142 0.6284604 0.9430035 0.9830843"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"function vectorized thus exported.Use pipgd_pov_headcount instead.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"","code":"pipgd_pov_headcount_nv( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"numeric poverty headcount","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":null,"dir":"Reference","previous_headings":"","what":"Get quantile at specified shared of population — pipgd_quantile","title":"Get quantile at specified shared of population — pipgd_quantile","text":"pipgd_quantile returns quantile (.e., monetary value) corresponds shared population lives threshold.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get quantile at specified shared of population — pipgd_quantile","text":"","code":"pipgd_quantile( params = NULL, welfare = NULL, weight = NULL, n = 10, popshare = seq(from = 1/n, to = 1, by = 1/n), mean = 1, complete = getOption(\"pipster.return_complete\"), lorenz = NULL )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get quantile at specified shared of population — pipgd_quantile","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population n numeric scalar number quantiles used popshare popshare numeric: vector share population. Default seq(= 1/n, = 1, = 1/n) mean numeric: welfare mean distribution. complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get quantile at specified shared of population — pipgd_quantile","text":"vector quantiles","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get quantile at specified shared of population — pipgd_quantile","text":"basically inverse estimating poverty rate (headcount population share) poverty line. case, provide headcount pipgs_quantile returns \"poverty line\". quantiles calculated function mean distribution times x factor. Basically, quantile x times mean. default, mean equal 1, implies , mean value provided, return value equal x. NOTE: outcome pipgd_quantile necessarily inverse pipgd_pov_headcount. reason ia , pipgd_pov_headcount selects Lorenz parametrization fits better specified point distribution (e.., poverty lines). pipgd_quantile, contrast, use Lorenz parametrization point. lorenz used one fits best distributional measures.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get quantile at specified shared of population — pipgd_quantile","text":"","code":"pipgd_quantile(welfare = pip_gd$L, weight = pip_gd$P) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $dist_stats #> $dist_stats$popshare #> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 #> #> $dist_stats$quantile #> [1] 0.4581878 0.5697811 0.6679802 0.7617734 0.8582851 0.9657644 1.0978575 #> [8] 1.2861477 1.6470281 5.8269953 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":null,"dir":"Reference","previous_headings":"","what":"Quantile welfare share — pipgd_quantile_welfare_share","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"pipgd_quantile_welfare_share returns share welfare held particular quantile. Notice pipgd_welfare_share_at get share welfare held particular share population. Instead, pipgd_quantile_welfare_share returns proportion welfare specified quantile holds.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"","code":"pipgd_quantile_welfare_share( params = NULL, welfare = NULL, weight = NULL, complete = getOption(\"pipster.return_complete\"), lorenz = NULL, n = 10, popshare = seq(from = 1/n, to = 1, by = 1/n) )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta n numeric scalar number quantiles used popshare popshare numeric: vector share population. Default seq(= 1/n, = 1, = 1/n)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"list welfare shares","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"","code":"pipgd_quantile_welfare_share(welfare = pip_gd$L, weight = pip_gd$P, complete = FALSE) #> $dist_stats #> $dist_stats$popshare #> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 #> #> $dist_stats$quantile_welfare_share #> [1] 0.03911772 0.05155974 0.06195678 0.07149424 0.08094994 0.09106744 #> [7] 0.10288972 0.11849266 0.14404584 0.23842592 #> #>"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":null,"dir":"Reference","previous_headings":"","what":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"Get selected Lorenz curve distributional stats","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"","code":"pipgd_select_lorenz( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"list values best lorenz fit distributional Stats","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"","code":"# Using Lorenz parameters from get_gd_lorenz_params withr::local_options(pipster.return_complete = TRUE) params <- pipgd_validate_lorenz( welfare = pip_gd$L, weight = pip_gd$P) params <- pipgd_validate_lorenz( params = params, complete = TRUE) pipgd_select_lorenz(params = params) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" # Using Lorenz parameters from pipgd_validate_lorenz params <- pipgd_validate_lorenz( welfare = pip_gd$L, weight = pip_gd$P, complete = TRUE) pipgd_select_lorenz(params = params) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" # Using original vectors pipgd_select_lorenz( welfare = pip_gd$L, weight = pip_gd$P) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> attr(,\"class\") #> [1] \"pipgd_params\""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":null,"dir":"Reference","previous_headings":"","what":"Check validity of Lorenz Curve — pipgd_validate_lorenz","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"Check validity Lorenz Curve","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"","code":"pipgd_validate_lorenz( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric: welfare mean distribution. times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"list distributional validity Lorenz model","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"","code":"# Using Lorenz parameters from pipgd_validate_lorenz res <- pipgd_params(welfare = pip_gd$L, weight = pip_gd$P) |> pipgd_validate_lorenz() |> pipgd_select_lorenz() # Using welfare and population vecotrs res2 <- pipgd_select_lorenz(welfare = pip_gd$L, weight = pip_gd$P) identical(res, res2) #> [1] TRUE"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":null,"dir":"Reference","previous_headings":"","what":"Welfare share by quantile in group data — pipgd_welfare_share_at","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"pipgd_welfare_share_at returns share welfare held specified share population parameter popshare. Alternatively, can select number quantiles (10 default), estimate corresponding share welfare .","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"","code":"pipgd_welfare_share_at( params = NULL, welfare = NULL, weight = NULL, complete = getOption(\"pipster.return_complete\"), lorenz = NULL, n = 10, popshare = seq(from = 1/n, to = 1, by = 1/n) )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta n numeric scalar number quantiles used popshare popshare numeric: vector share population. Default seq(= 1/n, = 1, = 1/n)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"list vector share welfare quantiles","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"","code":"pipgd_welfare_share_at(welfare = pip_gd$L, weight = pip_gd$P, complete = FALSE) #> $dist_stats #> $dist_stats$popshare #> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 #> #> $dist_stats$welfare_share_at #> [1] 0.03911772 0.09067747 0.15263425 0.22412849 0.30507843 0.39614586 #> [7] 0.49903558 0.61752824 0.76157408 1.00000000 #> #>"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipster.html","id":null,"dir":"Reference","previous_headings":"","what":"pipster: Poverty and Inequality methodology of WB methodology — pipster","title":"pipster: Poverty and Inequality methodology of WB methodology — pipster","text":"higher-level package estimate Socioeconomic indicators poverty inequality using methodology WorlD Bank. packages mainly wrapper lower-level package wbpip","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipster.html","id":"pipster-functions","dir":"Reference","previous_headings":"","what":"pipster functions","title":"pipster: Poverty and Inequality methodology of WB methodology — pipster","text":"pipster functions divided X groups. first, important set functions estimate especif indicators using input welfare weights vector microdata group data.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Return data according to format — return_format","title":"Return data according to format — return_format","text":"Return data according format","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return data according to format — return_format","text":"","code":"return_format( ld, var, povline = NULL, complete = FALSE, format = c(\"dt\", \"list\", \"atomic\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return data according to format — return_format","text":"ld list data var character: name variable returned. format character: either \"dt\" data.table, \"list\" \"atomic\" single numeric vector, whose names corresponding selected Lorenz value. Default \"dt\"","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return data according to format — return_format","text":"data.table, list, atomic vector","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":null,"dir":"Reference","previous_headings":"","what":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"functions uses heuristic round sum closest integers, possible vectors intended sum 1, fail precision.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"","code":"sum_up_to_one(x, digits = 0)"},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"x numeric: vector whose elements might sum 1 100 digits numeric: threshold sum. Default 0 decimals","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"logical","code":""}]
+[{"path":"https://pip-technical-team.github.io/pipster/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 pipster authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":[]},{"path":"https://pip-technical-team.github.io/pipster/articles/gd_functions.html","id":"getting-started-with-pipsterpipgd_-functions","dir":"Articles","previous_headings":"Group Data","what":"Getting started with pipster::pipgd_* functions","title":"gd_functions","text":"draft.","code":""},{"path":"https://pip-technical-team.github.io/pipster/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"R.Andres Castaneda. Author, maintainer.","code":""},{"path":"https://pip-technical-team.github.io/pipster/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Castaneda R (2024). pipster: Package (One Line, Title Case). R package version 0.0.0.9002, https://pip-technical-team.github.io/pipster/.","code":"@Manual{, title = {pipster: What the Package Does (One Line, Title Case)}, author = {R.Andres Castaneda}, year = {2024}, note = {R package version 0.0.0.9002}, url = {https://pip-technical-team.github.io/pipster/}, }"},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"pipster","dir":"","previous_headings":"","what":"What the Package Does (One Line, Title Case)","title":"What the Package Does (One Line, Title Case)","text":"goal pipster make use wbpip functions easily.","code":""},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"What the Package Does (One Line, Title Case)","text":"can install development version pipster GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"PIP-Technical-Team/pipster\") library(pipster) library(collapse) #> Warning: package 'collapse' was built under R version 4.3.2 #> collapse 2.0.7, see ?`collapse-package` or ?`collapse-documentation` #> #> Attaching package: 'collapse' #> The following object is masked from 'package:stats': #> #> D ## basic example code"},{"path":[]},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"group-data","dir":"","previous_headings":"Identify type of data","what":"Group Data","title":"What the Package Does (One Line, Title Case)","text":"","code":"# W: Weights, share of population, sum up to 100 # X: welfare vector with mean welfare by decile # P:Cumulative share of population # L: Cumulative share of welfare # R: share of welfare, sum up to 1. W = c(0.92, 2.47, 5.11, 7.9, 9.69, 15.24, 13.64, 16.99, 10, 9.78, 3.96, 1.81, 2.49) X = c(24.84, 35.8, 45.36, 55.1, 64.92, 77.08, 91.75, 110.64, 134.9, 167.76, 215.48, 261.66, 384.97) P = c(0.0092, 0.0339, 0.085, 0.164, 0.2609, 0.4133, 0.5497, 0.7196, 0.8196, 0.9174, 0.957, 0.9751, 1) L = c(0.00208, 0.01013, 0.03122, 0.07083, 0.12808, 0.23498, 0.34887, 0.51994, 0.6427, 0.79201, 0.86966, 0.91277, 1) R = (W * X) / sum(W * X) # type 1 ------ ## up to 1 --------- identify_pip_type(welfare = L, weight = P) #> [1] \"gd_1\" ## up to 100 --------- identify_pip_type(welfare = L*100, weight = P) #> [1] \"gd_1\" # type 2 ----------- ## up to 1 ----------- identify_pip_type(welfare = R, weight = W/100) #> ! vectors not sorted #> [1] \"gd_2\" ## up to 100 --------- identify_pip_type(welfare = R*100, weight = W) #> ! vectors not sorted #> [1] \"gd_2\" # type 5 ----------- identify_pip_type(welfare = X, weight = W/100) #> [1] \"gd_5\" # type 3 ----------- identify_pip_type(welfare = X, weight = P) #> [1] \"gd_3\""},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"microdata","dir":"","previous_headings":"Identify type of data","what":"Microdata","title":"What the Package Does (One Line, Title Case)","text":"","code":"# l: length # Y: welfare # Q: population or weights # I: imputation ID l <- 300 Y <- sample(1000, l,replace = TRUE) Q <- sample(35, l,replace = TRUE) I <- sample(1:5, l,replace = TRUE) identify_pip_type(welfare = Y, weight = Q) #> ! vectors not sorted #> [1] \"md\" identify_pip_type(welfare = Y, weight = Q, imputation_id = I) #> ! vectors not sorted #> [1] \"id\" I2 <- rep(1, l) identify_pip_type(welfare = Y, weight = Q, imputation_id = I2) #> ! vectors not sorted #> [1] \"md\""},{"path":[]},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"group-data-1","dir":"","previous_headings":"Convert to PIP format","what":"Group Data","title":"What the Package Does (One Line, Title Case)","text":"Convert Group Data Type-2 Group Data Type-1 . Notice whole dataframe parsed function need whole dataframe back. enough parsing just welfare weight vetors.","code":"pip_gd |> fselect(R,W) #> R W #> 1 0.002079692 0.92 #> 2 0.008047104 2.47 #> 3 0.021093739 5.11 #> 4 0.039613054 7.90 #> 5 0.057248211 9.69 #> 6 0.106902117 15.24 #> 7 0.113888553 13.64 #> 8 0.171066582 16.99 #> 9 0.122764156 10.00 #> 10 0.149309315 9.78 #> 11 0.077653634 3.96 #> 12 0.043099829 1.81 #> 13 0.087234016 2.49 gd <- as_pip(dt = pip_gd, welfare_var = \"R\", weight_var = \"W\", pip_type = \"gd_2\") #> i columns \"welfare\" and \"W\" have been rescaled to range (0,1] gd |> fselect(R,W) #> R W #> 1: 0.002079692 0.0092 #> 2: 0.010126796 0.0339 #> 3: 0.031220536 0.0850 #> 4: 0.070833589 0.1640 #> 5: 0.128081800 0.2609 #> 6: 0.234983917 0.4133 #> 7: 0.348872469 0.5497 #> 8: 0.519939051 0.7196 #> 9: 0.642703207 0.8196 #> 10: 0.792012522 0.9174 #> 11: 0.869666156 0.9570 #> 12: 0.912765984 0.9751 #> 13: 1.000000000 1.0000 class(gd) #> [1] \"pipgd\" \"data.table\" \"data.frame\""},{"path":"https://pip-technical-team.github.io/pipster/index.html","id":"micro-data","dir":"","previous_headings":"Convert to PIP format","what":"Micro Data","title":"What the Package Does (One Line, Title Case)","text":"","code":"md <- as_pip(dt = pip_md, welfare_var = \"welfare\", weight_var = \"weight\") #> ! vectors not sorted #> > PIP type identified: \"md\" waldo::compare(md, roworderv(pip_md, \"welfare\")) #> `class(old)`: \"pipmd\" \"data.table\" \"data.frame\" #> `class(new)`: \"tbl_df\" \"tbl\" \"data.frame\""},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":null,"dir":"Reference","previous_headings":"","what":"add PIP class — add_pip_class","title":"add PIP class — add_pip_class","text":"add PIP class","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"add PIP class — add_pip_class","text":"","code":"add_pip_class(x, pip_type)"},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"add PIP class — add_pip_class","text":"x data frame pip_type character: One \"md\", \"id\", \"gd_*\". Generally comes output identify_pip_type()","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/add_pip_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"add PIP class — add_pip_class","text":"data frame pip class","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert to PIP format and add class — as_pip","title":"Convert to PIP format and add class — as_pip","text":"Convert welfare, weight (optionally) imputed id vectors PIP format data.frame","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert to PIP format and add class — as_pip","text":"","code":"as_pip( dt, welfare_var, weight_var, imputation_id_var = NULL, pip_type = NULL, groupdata_threshold = getOption(\"pipster.gd_threshold\"), verbose = getOption(\"pipster.verbose\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert to PIP format and add class — as_pip","text":"dt data.frame welfare data welfare_var character: variable name welfare vector dt weight_var character: variable name weight vector dt imputation_id_var character: variable name imputation ID vector dt pip_type character: One \"md\", \"id\", \"gd_*\". Generally comes output identify_pip_type() groupdata_threshold numeric: threshold discriminate micro data group data. Default 200 observations verbose logical: Whether display important messages data query","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert to PIP format and add class — as_pip","text":"data.frame","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/as_pip.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert to PIP format and add class — as_pip","text":"","code":"as_pip(dt = pip_md, welfare_var = \"welfare\", weight_var = \"weight\") |> class() #> ! vectors not sorted #> → PIP type identified: \"md\" #> [1] \"pipmd\" \"data.table\" \"data.frame\""},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Check parameters of get_gd functions — check_pipgd_params","title":"Check parameters of get_gd functions — check_pipgd_params","text":"Check parameters get_gd functions","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check parameters of get_gd functions — check_pipgd_params","text":"","code":"check_pipgd_params(lp)"},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check parameters of get_gd functions — check_pipgd_params","text":"lp list parameters","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/check_pipgd_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check parameters of get_gd functions — check_pipgd_params","text":"invisible TRUE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert vectors to microdata data PIP format — convert_to_pip_md","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"Convert vectors microdata data PIP format","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"","code":"convert_to_pip_md( dt, welfare_var, imputation_id_var, verbose = getOption(\"pipster.verbose\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"dt data.frame welfare data welfare_var character: variable name welfare vector dt imputation_id_var character: variable name imputation ID vector dt verbose logical: Whether display important messages data query","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/convert_to_pip_md.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert vectors to microdata data PIP format — convert_to_pip_md","text":"dataframe","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify PIP type — identify_pip_type","title":"Identify PIP type — identify_pip_type","text":"Based welfare weight vectors identifies whether data microdata, group data imputed data","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify PIP type — identify_pip_type","text":"","code":"identify_pip_type( welfare, weight = rep(1, length(welfare)), imputation_id = NULL, groupdata_threshold = getOption(\"pipster.gd_threshold\"), verbose = getOption(\"pipster.verbose\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify PIP type — identify_pip_type","text":"welfare numeric: welfare variable, either income consumption weight numeric: expansion sample weighs. Default vector o 1s length welfare imputation_id numeric: vector identifies different imputations. Default NULL groupdata_threshold numeric: threshold discriminate micro data group data. Default 200 observations verbose logical: Whether display important messages data query","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify PIP type — identify_pip_type","text":"character length 1.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/identify_pip_type.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify PIP type — identify_pip_type","text":"","code":"# Group data ------- # W: Weights, share of population, sum up to 100 # X: welfare vector with mean welfare by decile # P:Cumulative share of population # L: Cumulative share of welfare # R: share of welfare, sum up to 1. W = c(0.92, 2.47, 5.11, 7.9, 9.69, 15.24, 13.64, 16.99, 10, 9.78, 3.96, 1.81, 2.49) X = c(24.84, 35.8, 45.36, 55.1, 64.92, 77.08, 91.75, 110.64, 134.9, 167.76, 215.48, 261.66, 384.97) P = c(0.0092, 0.0339, 0.085, 0.164, 0.2609, 0.4133, 0.5497, 0.7196, 0.8196, 0.9174, 0.957, 0.9751, 1) L = c(0.00208, 0.01013, 0.03122, 0.07083, 0.12808, 0.23498, 0.34887, 0.51994, 0.6427, 0.79201, 0.86966, 0.91277, 1) R = (W * X) / sum(W * X) ## type 1 ------ identify_pip_type(welfare = L, weight = P) #> [1] \"gd_1\" identify_pip_type(welfare = L*100, weight = P) #> [1] \"gd_1\" ## type 2 ----------- identify_pip_type(welfare = R, weight = W/100) #> ! vectors not sorted #> [1] \"gd_2\" identify_pip_type(welfare = R*100, weight = W) #> ! vectors not sorted #> [1] \"gd_2\" ## type 5 ----------- identify_pip_type(welfare = X, weight = W/100) #> [1] \"gd_5\" identify_pip_type(welfare = X, weight = W) #> [1] \"gd_5\" ## type 3 ----------- identify_pip_type(welfare = X, weight = P) #> [1] \"gd_3\" identify_pip_type(welfare = X, weight = P*100) #> [1] \"gd_3\" # Microdata ------- l <- 300 Y <- sample(1000, l,replace = TRUE) Q <- sample(35, l,replace = TRUE) I <- sample(1:5, l,replace = TRUE) identify_pip_type(welfare = Y, weight = Q) #> ! vectors not sorted #> [1] \"md\" identify_pip_type(welfare = Y, weight = Q, imputation_id = I) #> ! vectors not sorted #> [1] \"id\""},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether the vector is cumulative up to 1 — is_cumulative","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"Check whether vector cumulative 1","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"","code":"is_cumulative(x, digits = 8)"},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"x numeric: vector whose elements might cumulative 1 digits numeric: number digits cumulative sum threshold. Default 8 decimals","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/is_cumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether the vector is cumulative up to 1 — is_cumulative","text":"logical","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_gd — pip_gd","title":"pip_gd — pip_gd","text":"PIP Group Data example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_gd — pip_gd","text":"","code":"pip_gd"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_gd — pip_gd","text":"grouped data frame five variables: W Weights, share population, sum 100 X welfare vector mean welfare decile P Cumulative share population L Cumulative share welfare R share welfare, sum 1","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_gd.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"pip_gd — pip_gd","text":"Datt, Gaurav. 1998. “Computational Tools Poverty Measurement Analysis.” http://ebrary.ifpri.org/utils/getfile/collection/p15738coll2/id/125673/filename/125704.pdf, downloaded 2023-07-18 details, see https://datanalytics.worldbank.org/PIP-Methodology/welfareaggregate.html#tgd","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_id.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_id — pip_id","title":"pip_id — pip_id","text":"PIP imputed data example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_id — pip_id","text":"","code":"pip_id"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_id.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_id — pip_id","text":"imputed data frame three variables: welfare welfare (income consumption) weight population weights imputation_id Imputation ID","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_md — pip_md","title":"pip_md — pip_md","text":"PIP microdata example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_md — pip_md","text":"","code":"pip_md"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_md — pip_md","text":"microdata frame two variables: welfare welfare (income consumption) weight population weights","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md_s.html","id":null,"dir":"Reference","previous_headings":"","what":"pip_md_s — pip_md_s","title":"pip_md_s — pip_md_s","text":"Small PIP microdata example.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md_s.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"pip_md_s — pip_md_s","text":"","code":"pip_md_s"},{"path":"https://pip-technical-team.github.io/pipster/reference/pip_md_s.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"pip_md_s — pip_md_s","text":"100 obs microdata frame two variables: welfare welfare (income consumption) weight population weights","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Group Data Parameters — pipgd_params","title":"Get Group Data Parameters — pipgd_params","text":"Get Parameters key values derived quadratic Beta Lorenz parametrization. welfare population must vectors group data dataset","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Group Data Parameters — pipgd_params","text":"","code":"pipgd_params(welfare, weight, mean = NULL, population = NULL)"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Group Data Parameters — pipgd_params","text":"welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL population numeric scalar actual size population. Default NULL","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Group Data Parameters — pipgd_params","text":"list Group data parameters parameters","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Group Data Parameters — pipgd_params","text":"Datt, G. 1998. \"Computational Tools Poverty Measurement Analysis\". FCND Discussion Paper 50. World Bank, Washington, DC. Krause, M. 2013. \"Corrigendum Elliptical Lorenz curves\". Journal Econometrics 174 (1): 44. Villasenor, J., B. C. Arnold. 1989. \"Elliptical Lorenz curves\". Journal Econometrics 40 (2): 327-338.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_params.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Group Data Parameters — pipgd_params","text":"","code":"# Get Lorenz parameters res <- pipgd_params( welfare = pip_gd$L, weight = pip_gd$P) str(res) #> List of 2 #> $ gd_params:List of 2 #> ..$ lq:List of 2 #> .. ..$ reg_results:List of 7 #> .. .. ..$ ymean: num 0.122 #> .. .. ..$ sst : num 0.0846 #> .. .. ..$ coef : Named num [1:3] 0.888 -1.451 0.203 #> .. .. .. ..- attr(*, \"names\")= chr [1:3] \"A\" \"B\" \"C\" #> .. .. ..$ sse : num 3.42e-06 #> .. .. ..$ r2 : num 1 #> .. .. ..$ mse : num 3.8e-07 #> .. .. ..$ se : num [1:3] 0.00667 0.01903 0.01283 #> .. ..$ key_values :List of 6 #> .. .. ..$ e : num -0.639 #> .. .. ..$ m : num -1.44 #> .. .. ..$ n : num 1.04 #> .. .. ..$ r : num 1.86 #> .. .. ..$ s1: num -0.281 #> .. .. ..$ s2: num 1 #> ..$ lb:List of 2 #> .. ..$ reg_results:List of 7 #> .. .. ..$ ymean: num -2.5 #> .. .. ..$ sst : num 11 #> .. .. ..$ coef : Named num [1:3] 0.561 0.931 0.58 #> .. .. .. ..- attr(*, \"names\")= chr [1:3] \"A\" \"B\" \"C\" #> .. .. ..$ sse : num 0.0032 #> .. .. ..$ r2 : num 1 #> .. .. ..$ mse : num 0.000356 #> .. .. ..$ se : num [1:3] 0.01487 0.00551 0.00641 #> .. ..$ key_values : logi NA #> $ data :List of 2 #> ..$ welfare: num [1:13] 0.00208 0.01013 0.03122 0.07083 0.12808 ... #> .. ..- attr(*, \"label\")= chr \"Cumulative share of welfare\" #> ..$ weight : num [1:13] 0.0092 0.0339 0.085 0.164 0.2609 ... #> .. ..- attr(*, \"label\")= chr \"Cumulative share of population\" #> - attr(*, \"class\")= chr \"pipgd_params\""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty gap (FGT1) — pipgd_pov_gap","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"Estimate poverty gap (FGT1)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"","code":"pipgd_pov_gap( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), format = c(\"dt\", \"list\", \"atomic\"), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value format character: either \"dt\" data.table, \"list\" \"atomic\" single numeric vector, whose names corresponding selected Lorenz value. Default \"dt\" lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"list poverty gaps. See format parameter","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap","text":"","code":"pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, mean = 109.90, povline = 89, complete = FALSE) #> povline pov_gap lorenz #> 1: 89 0.1247467 lq # Return data.table pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), complete = FALSE) #> povline pov_gap lorenz #> 1: 0.5 0.02322722 lq #> 2: 1.0 0.20434633 lq #> 3: 2.0 0.52347496 lq #> 4: 3.0 0.67167363 lq # Return list pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\") #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.02322722 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.2043463 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.523475 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.6716736 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return list complete pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\", complete = TRUE) #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.02322722 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.2043463 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.523475 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> $pov_stats$pov_gap #> [1] 0.6716736 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return data.table pipgd_pov_gap( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"atomic\", complete = FALSE) #> lq lq lq lq #> 0.02322722 0.20434633 0.52347496 0.67167363"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"function vectorized. Use pipgd_pov_gap instead","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"","code":"pipgd_pov_gap_nv( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_gap_nv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty gap (FGT1) — pipgd_pov_gap_nv","text":"numeric poverty gap value","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"Estimate poverty headcount (FGT0)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"","code":"pipgd_pov_headcount( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), format = c(\"dt\", \"list\", \"atomic\"), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value format character: either \"dt\" data.table, \"list\" \"atomic\" single numeric vector, whose names corresponding selected Lorenz value. Default \"dt\" lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"list numeric vector. Check format argument","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount","text":"","code":"pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, mean = 109.90, povline = 89, complete = FALSE) #> povline headcount lorenz #> 1: 89 0.4506148 lq # Return data.table pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), complete = FALSE) #> povline headcount lorenz #> 1: 0.5 0.1354142 lq #> 2: 1.0 0.6284604 lq #> 3: 2.0 0.9430035 lq #> 4: 3.0 0.9830843 lq # Return list pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\") #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return list complete pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"list\", complete = TRUE) #> $pl0.5 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.1354142 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 0.5;0.5 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.13313 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.1354142 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl1 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.6284604 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl2 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9430035 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 2;2 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9500443 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9430035 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> #> $pl3 #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.9830843 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 3;3 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.9876954 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $pov_stats #> $pov_stats$headcount #> [1] 0.9830843 #> #> $pov_stats$lorenz #> [1] \"lq\" #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" #> # Return data.table pipgd_pov_headcount( welfare = pip_gd$L, weight = pip_gd$P, povline = c(.5, 1, 2, 3), format = \"atomic\", complete = FALSE) #> lq lq lq lq #> 0.1354142 0.6284604 0.9430035 0.9830843"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":null,"dir":"Reference","previous_headings":"","what":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"function vectorized thus exported.Use pipgd_pov_headcount instead.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"","code":"pipgd_pov_headcount_nv( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), lorenz = NULL, complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_pov_headcount_nv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Estimate poverty headcount (FGT0) — pipgd_pov_headcount_nv","text":"numeric poverty headcount","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":null,"dir":"Reference","previous_headings":"","what":"Get quantile at specified shared of population — pipgd_quantile","title":"Get quantile at specified shared of population — pipgd_quantile","text":"pipgd_quantile returns quantile (.e., monetary value) corresponds shared population lives threshold.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get quantile at specified shared of population — pipgd_quantile","text":"","code":"pipgd_quantile( params = NULL, welfare = NULL, weight = NULL, n = 10, popshare = seq(from = 1/n, to = 1, by = 1/n), mean = 1, complete = getOption(\"pipster.return_complete\"), lorenz = NULL )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get quantile at specified shared of population — pipgd_quantile","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population n numeric scalar number quantiles used popshare popshare numeric: vector share population. Default seq(= 1/n, = 1, = 1/n) mean numeric: welfare mean distribution. complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get quantile at specified shared of population — pipgd_quantile","text":"vector quantiles","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get quantile at specified shared of population — pipgd_quantile","text":"basically inverse estimating poverty rate (headcount population share) poverty line. case, provide headcount pipgs_quantile returns \"poverty line\". quantiles calculated function mean distribution times x factor. Basically, quantile x times mean. default, mean equal 1, implies , mean value provided, return value equal x. NOTE: outcome pipgd_quantile necessarily inverse pipgd_pov_headcount. reason ia , pipgd_pov_headcount selects Lorenz parametrization fits better specified point distribution (e.., poverty lines). pipgd_quantile, contrast, use Lorenz parametrization point. lorenz used one fits best distributional measures.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get quantile at specified shared of population — pipgd_quantile","text":"","code":"pipgd_quantile(welfare = pip_gd$L, weight = pip_gd$P) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> $dist_stats #> $dist_stats$popshare #> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 #> #> $dist_stats$quantile #> [1] 0.4581878 0.5697811 0.6679802 0.7617734 0.8582851 0.9657644 1.0978575 #> [8] 1.2861477 1.6470281 5.8269953 #> #> #> attr(,\"class\") #> [1] \"pipgd_params\""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":null,"dir":"Reference","previous_headings":"","what":"Quantile welfare share — pipgd_quantile_welfare_share","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"pipgd_quantile_welfare_share returns share welfare held particular quantile. Notice pipgd_welfare_share_at get share welfare held particular share population. Instead, pipgd_quantile_welfare_share returns proportion welfare specified quantile holds.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"","code":"pipgd_quantile_welfare_share( params = NULL, welfare = NULL, weight = NULL, complete = getOption(\"pipster.return_complete\"), lorenz = NULL, n = 10, popshare = seq(from = 1/n, to = 1, by = 1/n) )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta n numeric scalar number quantiles used popshare popshare numeric: vector share population. Default seq(= 1/n, = 1, = 1/n)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"list welfare shares","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_quantile_welfare_share.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quantile welfare share — pipgd_quantile_welfare_share","text":"","code":"pipgd_quantile_welfare_share(welfare = pip_gd$L, weight = pip_gd$P, complete = FALSE) #> $dist_stats #> $dist_stats$popshare #> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 #> #> $dist_stats$quantile_welfare_share #> [1] 0.03911772 0.05155974 0.06195678 0.07149424 0.08094994 0.09106744 #> [7] 0.10288972 0.11849266 0.14404584 0.23842592 #> #>"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":null,"dir":"Reference","previous_headings":"","what":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"Get selected Lorenz curve distributional stats","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"","code":"pipgd_select_lorenz( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric scalar distribution mean. Default NULL times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"list values best lorenz fit distributional Stats","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_select_lorenz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get selected Lorenz curve for distributional stats — pipgd_select_lorenz","text":"","code":"# Using Lorenz parameters from get_gd_lorenz_params withr::local_options(pipster.return_complete = TRUE) params <- pipgd_validate_lorenz( welfare = pip_gd$L, weight = pip_gd$P) params <- pipgd_validate_lorenz( params = params, complete = TRUE) pipgd_select_lorenz(params = params) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" # Using Lorenz parameters from pipgd_validate_lorenz params <- pipgd_validate_lorenz( welfare = pip_gd$L, weight = pip_gd$P, complete = TRUE) pipgd_select_lorenz(params = params) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> attr(,\"class\") #> [1] \"pipgd_params\" # Using original vectors pipgd_select_lorenz( welfare = pip_gd$L, weight = pip_gd$P) #> $gd_params #> $gd_params$lq #> $gd_params$lq$reg_results #> $gd_params$lq$reg_results$ymean #> [1] 0.1219752 #> #> $gd_params$lq$reg_results$sst #> [1] 0.08456216 #> #> $gd_params$lq$reg_results$coef #> A B C #> 0.8877478 -1.4514459 0.2026400 #> #> $gd_params$lq$reg_results$sse #> [1] 3.418058e-06 #> #> $gd_params$lq$reg_results$r2 #> [1] 0.9999596 #> #> $gd_params$lq$reg_results$mse #> [1] 3.797842e-07 #> #> $gd_params$lq$reg_results$se #> [1] 0.006673127 0.019034521 0.012827923 #> #> #> $gd_params$lq$key_values #> $gd_params$lq$key_values$e #> [1] -0.638942 #> #> $gd_params$lq$key_values$m #> [1] -1.444296 #> #> $gd_params$lq$key_values$n #> [1] 1.044219 #> #> $gd_params$lq$key_values$r #> [1] 1.857124 #> #> $gd_params$lq$key_values$s1 #> [1] -0.2814192 #> #> $gd_params$lq$key_values$s2 #> [1] 1.004414 #> #> #> $gd_params$lq$validity #> $gd_params$lq$validity$is_normal #> [1] TRUE #> #> $gd_params$lq$validity$is_valid #> [1] TRUE #> #> $gd_params$lq$validity$headcount #> [1] 0.6284604 #> #> #> #> $gd_params$lb #> $gd_params$lb$reg_results #> $gd_params$lb$reg_results$ymean #> [1] -2.496791 #> #> $gd_params$lb$reg_results$sst #> [1] 10.98072 #> #> $gd_params$lb$reg_results$coef #> A B C #> 0.5613532 0.9309501 0.5800259 #> #> $gd_params$lb$reg_results$sse #> [1] 0.003204989 #> #> $gd_params$lb$reg_results$r2 #> [1] 0.9997081 #> #> $gd_params$lb$reg_results$mse #> [1] 0.0003561098 #> #> $gd_params$lb$reg_results$se #> [1] 0.014871578 0.005505620 0.006407669 #> #> #> $gd_params$lb$key_values #> [1] NA #> #> $gd_params$lb$validity #> $gd_params$lb$validity$is_valid #> [1] TRUE #> #> $gd_params$lb$validity$is_normal #> [1] TRUE #> attr(,\"label\") #> [1] \"Normality with a mean of 1 and a poverty line of 1;1 times the mean.\" #> #> $gd_params$lb$validity$headcount #> [1] 0.6161877 #> #> #> #> #> $data #> $data$welfare #> [1] 0.00208 0.01013 0.03122 0.07083 0.12808 0.23498 0.34887 0.51994 0.64270 #> [10] 0.79201 0.86966 0.91277 1.00000 #> attr(,\"label\") #> [1] \"Cumulative share of welfare\" #> #> $data$weight #> [1] 0.0092 0.0339 0.0850 0.1640 0.2609 0.4133 0.5497 0.7196 0.8196 0.9174 #> [11] 0.9570 0.9751 1.0000 #> attr(,\"label\") #> [1] \"Cumulative share of population\" #> #> #> $selected_lorenz #> $selected_lorenz$for_dist #> [1] \"lq\" #> #> $selected_lorenz$for_pov #> [1] \"lb\" #> #> $selected_lorenz$use_lq_for_dist #> [1] TRUE #> #> $selected_lorenz$use_lq_for_pov #> [1] FALSE #> #> #> attr(,\"class\") #> [1] \"pipgd_params\""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":null,"dir":"Reference","previous_headings":"","what":"Check validity of Lorenz Curve — pipgd_validate_lorenz","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"Check validity Lorenz Curve","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"","code":"pipgd_validate_lorenz( params = NULL, welfare = NULL, weight = NULL, mean = 1, times_mean = 1, popshare = NULL, povline = ifelse(is.null(popshare), mean * times_mean, NA_real_), complete = getOption(\"pipster.return_complete\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population mean numeric: welfare mean distribution. times_mean numeric factor multiplies mean create relative povertyline. Default 1 popshare numeric: range (0,1). Share population. Provide share population instead poverty line povline numeric: value poverty line. Default mean value complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"list distributional validity Lorenz model","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_validate_lorenz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check validity of Lorenz Curve — pipgd_validate_lorenz","text":"","code":"# Using Lorenz parameters from pipgd_validate_lorenz res <- pipgd_params(welfare = pip_gd$L, weight = pip_gd$P) |> pipgd_validate_lorenz() |> pipgd_select_lorenz() # Using welfare and population vecotrs res2 <- pipgd_select_lorenz(welfare = pip_gd$L, weight = pip_gd$P) identical(res, res2) #> [1] TRUE"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":null,"dir":"Reference","previous_headings":"","what":"Welfare share by quantile in group data — pipgd_welfare_share_at","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"pipgd_welfare_share_at returns share welfare held specified share population parameter popshare. Alternatively, can select number quantiles (10 default), estimate corresponding share welfare .","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"","code":"pipgd_welfare_share_at( params = NULL, welfare = NULL, weight = NULL, complete = getOption(\"pipster.return_complete\"), lorenz = NULL, n = 10, popshare = seq(from = 1/n, to = 1, by = 1/n) )"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"params list parameters pipgd_validate_lorenz() welfare numeric vector cumulative share welfare (income/consumption) weight numeric vector cumulative share population complete logical: TRUE, returns list cumulative returns previously used get_gd functions. Default FALSE lorenz character NULL. Lorenz curve selected. \"lq\" Lorenz Quadratic \"lb\" Lorenz Beta n numeric scalar number quantiles used popshare popshare numeric: vector share population. Default seq(= 1/n, = 1, = 1/n)","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"list vector share welfare quantiles","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipgd_welfare_share_at.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Welfare share by quantile in group data — pipgd_welfare_share_at","text":"","code":"pipgd_welfare_share_at(welfare = pip_gd$L, weight = pip_gd$P, complete = FALSE) #> $dist_stats #> $dist_stats$popshare #> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 #> #> $dist_stats$welfare_share_at #> [1] 0.03911772 0.09067747 0.15263425 0.22412849 0.30507843 0.39614586 #> [7] 0.49903558 0.61752824 0.76157408 1.00000000 #> #>"},{"path":"https://pip-technical-team.github.io/pipster/reference/pipster.html","id":null,"dir":"Reference","previous_headings":"","what":"pipster: Poverty and Inequality methodology of WB methodology — pipster","title":"pipster: Poverty and Inequality methodology of WB methodology — pipster","text":"higher-level package estimate Socioeconomic indicators poverty inequality using methodology WorlD Bank. packages mainly wrapper lower-level package wbpip","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/pipster.html","id":"pipster-functions","dir":"Reference","previous_headings":"","what":"pipster functions","title":"pipster: Poverty and Inequality methodology of WB methodology — pipster","text":"pipster functions divided X groups. first, important set functions estimate especif indicators using input welfare weights vector microdata group data.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Return data according to format — return_format","title":"Return data according to format — return_format","text":"Return data according format","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return data according to format — return_format","text":"","code":"return_format( ld, var, povline = NULL, complete = FALSE, format = c(\"dt\", \"list\", \"atomic\") )"},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return data according to format — return_format","text":"ld list data var character: name variable returned. format character: either \"dt\" data.table, \"list\" \"atomic\" single numeric vector, whose names corresponding selected Lorenz value. Default \"dt\"","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/return_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return data according to format — return_format","text":"data.table, list, atomic vector","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":null,"dir":"Reference","previous_headings":"","what":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"functions uses heuristic round sum closest integers, possible vectors intended sum 1, fail precision.","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"","code":"sum_up_to_one(x, digits = 0)"},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"x numeric: vector whose elements might sum 1 100 digits numeric: threshold sum. Default 0 decimals","code":""},{"path":"https://pip-technical-team.github.io/pipster/reference/sum_up_to_one.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"check if elements of vector sum up to 1 or (100) — sum_up_to_one","text":"logical","code":""}]
diff --git a/sitemap.xml b/sitemap.xml
index c310b04..d29675a 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -9,6 +9,12 @@
https://pip-technical-team.github.io/pipster/LICENSE.html
+
+ https://pip-technical-team.github.io/pipster/articles/gd_functions.html
+
+
+ https://pip-technical-team.github.io/pipster/articles/index.html
+
https://pip-technical-team.github.io/pipster/authors.html