Easy web publishing from R

Write R Markdown documents in RStudio.
Share them here on RPubs. (It’s free, and couldn’t be simpler!)

Get Started

Recently Published

Variable Dia INF
Tarea_1
Herramientas Profesionales para Data Science
Chapter-4 Solution
This document contains the solutions to some of the exercises from the 4th chapter of "A First Course in Bayesian Statistical Methods" by Peter D. Hoff. Note that only the solutions requiring code have been posted. The rest are doable or are to be done only by hand.
Daily Facebook Political Ad Spending
As of January 20, 2026
Chapter-3 Solution
This document contains the solutions to some of the exercises from the 3rd chapter of "A First Course in Bayesian Statistical Methods" by Peter D. Hoff. Note that only the solutions requiring code have been posted. The rest are doable or are to be done only by hand.
Bank Dashboard
Brazil Primary Enrollment Rates: Multi-Source Comparison (1857-2015) Paglayan, Kang & PNAD
# Brazil Primary Enrollment Rates: Multi-Source Historical Comparison (1857-2015) Prepared using Claude Sonnet 4.5 This dataset combines three complementary sources of primary and elementary school enrollment rates in Brazil, offering comprehensive historical coverage spanning over 150 years of educational development. ## Data Sources ### 1. Paglayan (APSR) | 1857-2010 (154 years) **Metric**: Primary enrollment ratio **Calculation**: - Numerator: Students enrolled in primary education - Denominator: Population aged 5-14 years **Source**: Paglayan, A. S. (2021). The Non-Democratic Roots of Mass Education: Evidence from 200 Years. *American Political Science Review*, 115(1), 179–198. https://doi.org/10.1017/s0003055420000647 **Coverage**: 154 years of historical data (1857-2010) **Notes**: Longest time series, captures 19th and 20th century educational expansion --- ### 2. Kang et al. (FGV-IBRE) | 1933-2010 (78 years) **Metric**: Gross enrollment rate - Elementary education (*Ensino Fundamental*) **Calculation**: - Numerator: Students enrolled in elementary education (grades 1-9, encompassing both primary and lower secondary levels) - Denominator: Population aged 7-14 years **Source**: Kang, Thomas; Felix, Nilson; Paese, Luís (2021). Late and unequal: enrolments and retention in Brazilian education, 1933-2010. *Revista de História Económica / Journal of Iberian and Latin American Economic History*, 39(2), 191-218. **Methodological Note**: https://ibre.fgv.br/observatorio-produtividade/artigos/relatorio-metodologico-dados-historicos-de-educacao-no-brasil (Last updated: May 15, 2023) **Coverage**: 78 years of data (1933-2010) **Notes**: Most comprehensive institutional source; includes both primary and lower secondary enrollment --- ### 3. PNAD (IBGE via Base dos Dados) | 1992-2015 (20 years) **Metric**: Net school attendance rate **Calculation**: - Numerator: Individuals aged 5-14 currently attending school (`frequenta_escola == "sim"`) - Denominator: Total population aged 5-14 years **Source**: Pesquisa Nacional por Amostra de Domicílios (PNAD), Instituto Brasileiro de Geografia e Estatística (IBGE), accessed via Base dos Dados. **Coverage**: 20 years of survey data (1992-2015) **Data Gaps**: Missing years: 1994, 2000, 2010 (PNAD was not conducted in these years) **Notes**: Household survey data; provides contemporary validation for historical sources --- ## Key Methodological Differences | Dimension | Paglayan | Kang et al. | PNAD | |-----------|----------|-------------|------| | **Age Range** | 5-14 years | 7-14 years | 5-14 years | | **Educational Level** | Primary only | Elementary (primary + lower secondary) | School attendance (any level) | | **Rate Type** | Enrollment ratio | Gross enrollment rate | Net attendance rate | | **Can exceed 100%?** | Yes | Yes (due to grade repetition) | No | | **Time Period** | 1857-2010 | 1933-2010 | 1992-2015 (gaps: 1994, 2000, 2010) | ### Important Considerations 1. **Different age ranges**: Paglayan and PNAD use population aged 5-14, while Kang et al. use 7-14. This affects comparability, especially in early childhood enrollment. 2. **Educational scope**: - Paglayan captures primary education specifically - Kang et al. includes both primary (grades 1-5) and lower secondary (grades 6-9) - PNAD measures school attendance regardless of level 3. **Gross vs. Net rates**: - Paglayan and Kang report gross enrollment (can exceed 100% when students are older/younger than official age) - PNAD reports net attendance (bounded at 100%) 4. **Historical context**: Brazil's educational system underwent major reforms, including: - Creation of *Ensino Fundamental* (8 years) in 1971 - Extension to 9 years in 2006 - These changes affect cross-source comparability ## Citation If using this combined dataset, please cite all three sources: **Paglayan:** Paglayan, A. S. (2021). The Non-Democratic Roots of Mass Education: Evidence from 200 Years. *American Political Science Review*, 115(1), 179–198. https://doi.org/10.1017/s0003055420000647 **Kang et al.:** Kang, T., Felix, N., & Paese, L. (2021). Late and unequal: enrolments and retention in Brazilian education, 1933-2010. *Revista de História Económica / Journal of Iberian and Latin American Economic History*, 39(2), 191-218. **PNAD:** Instituto Brasileiro de Geografia e Estatística (IBGE). Pesquisa Nacional por Amostra de Domicílios (PNAD), 1992-2015. Accessed via Base dos Dados. --- **Compiled by**: Tales Mançano **Last Updated**: January 22, 2026 Prepared using Claude Sonnet 4.5
Data wrangling Lab2 - My Bio
Personal bio created for Data Wrangling Lab 2 using R Markdown.
Michigan Bioregions (10)
Michigan Bioregions (4)
Document
Understanding Simple Linear Regression