diff --git a/02-poverty.Rmd b/02-poverty.Rmd index 401f8b1..ffffef4 100644 --- a/02-poverty.Rmd +++ b/02-poverty.Rmd @@ -190,24 +190,23 @@ For additional usage examples of `svyarpt`, type `?convey::svyarpt` in the R con ### Real World Examples + +This section displays example results using nationally-representative surveys from both the United States and Brazil. We present a variety of surveys, levels of analysis, and subpopulation breakouts to provide users with a point of reference for the range of plausible values of the `svyarpt` function. + #### CPS-ASEC Household Income ```{r} -( - cps_household_arpt <- svyarpt(~ htotval , cps_household_design) -) +svyarpt(~ htotval , cps_household_design) -(cps_household_arpt_by_sex <- svyby( ~ htotval , ~ sex , cps_household_design , svyarpt ) ) +svyby(~ htotval , ~ sex , cps_household_design , svyarpt) ``` #### CPS-ASEC Family Income ```{r} -( - cps_family_arpt <- svyarpt(~ ftotval , cps_family_design) -) +svyarpt(~ ftotval , cps_family_design) -(cps_family_arpt_by_sex <- svyby( ~ ftotval , ~ sex , cps_family_design , svyarpt ) ) +svyby(~ ftotval , ~ sex , cps_family_design , svyarpt) ``` #### CPS-ASEC Worker Earnings @@ -226,27 +225,21 @@ svyby(~ pearnval , ~ sex , cps_ftfy_worker_design , svyarpt) #### PNAD-Contínua Per Capita Income ```{r} -( - pnadc_per_capita_arpt <- - svyarpt(~ deflated_per_capita_income , pnadc_design , na.rm = TRUE) -) +svyarpt( ~ deflated_per_capita_income , pnadc_design , na.rm = TRUE) -( - pnadc_per_capita_arpt_by_sex <- - svyby( ~ deflated_per_capita_income , ~ sex , pnadc_design , svyarpt , na.rm = TRUE) -) +svyby(~ deflated_per_capita_income , + ~ sex , + pnadc_design , + svyarpt , + na.rm = TRUE) ``` #### PNAD-Contínua Worker Earnings ```{r} -( - pnadc_earnings_arpt <- - svyarpt(~ deflated_labor_income , pnadc_design , na.rm = TRUE) -) +svyarpt( ~ deflated_labor_income , pnadc_design , na.rm = TRUE) -(pnadc_earnings_arpt_by_sex <- - svyby( ~ deflated_labor_income , ~ sex , pnadc_design , svyarpt , na.rm = TRUE)) +svyby( ~ deflated_labor_income , ~ sex , pnadc_design , svyarpt , na.rm = TRUE) ``` diff --git a/docs/3.1-at-risk-of-poverty-threshold-svyarpt.html b/docs/3.1-at-risk-of-poverty-threshold-svyarpt.html index 6e6b0b6..a0b8ad7 100644 --- a/docs/3.1-at-risk-of-poverty-threshold-svyarpt.html +++ b/docs/3.1-at-risk-of-poverty-threshold-svyarpt.html @@ -424,26 +424,23 @@
This section displays example results using nationally-representative surveys from both the United States and Brazil. We present a variety of surveys, levels of analysis, and subpopulation breakouts to provide users with a point of reference for the range of plausible values of the svyarpt
function.
## arpt SE
## htotval 44521 391.72
-
+
## sex htotval se.htotval
## male male 50623.2 455.4800
## female female 39000.0 185.2314
## arpt SE
## ftotval 55680 473.82
-
+
## sex ftotval se.ftotval
## male male 61320.0 504.0308
## female female 48856.2 453.7270
@@ -467,30 +464,24 @@ (
- pnadc_per_capita_arpt <-
- svyarpt(~ deflated_per_capita_income , pnadc_design , na.rm = TRUE)
-)
## arpt SE
## deflated_per_capita_income 598.16 1.8529
-(
- pnadc_per_capita_arpt_by_sex <-
- svyby( ~ deflated_per_capita_income , ~ sex , pnadc_design , svyarpt , na.rm = TRUE)
-)
## sex deflated_per_capita_income se.deflated_per_capita_income
## male male 607.2863 4.266030
## female female 593.8436 2.711941
## arpt SE
## deflated_labor_income 955.28 1.9433
-(pnadc_earnings_arpt_by_sex <-
- svyby( ~ deflated_labor_income , ~ sex , pnadc_design , svyarpt , na.rm = TRUE))
## sex deflated_labor_income se.deflated_labor_income
## male male 1074.9787 1.88908
## female female 890.7655 1.51126