The PNS (Pesquisa Nacional de Saude) is Brazil’s most comprehensive household health survey, conducted by IBGE in partnership with the Ministry of Health. It provides nationally representative data on health conditions, lifestyle, access to health services, and preventive care.
Two editions are available: 2013 and 2019, each with approximately 100,000+ respondents.
The healthbR package provides two complementary access
paths:
| Access path | Function | Description |
|---|---|---|
| Microdata | pns_data() |
Individual-level records via IBGE FTP |
| SIDRA tables | pns_sidra_data() |
Pre-tabulated indicators via IBGE API |
PNS organizes questions into thematic modules (A through Z). Use
pns_modules() to see what’s available:
For pre-calculated indicators with confidence intervals, use the SIDRA API path. This is ideal for quick analyses without downloading full microdata.
PNS has 69 SIDRA tables organized by 14 health themes:
# National level
pns_sidra_data(table = 7666, territorial_level = "brazil")
# By state
pns_sidra_data(table = 7666, territorial_level = "state")
# By capital city
pns_sidra_data(table = 7666, territorial_level = "capital")
# Specific state (e.g., Sao Paulo = 35)
pns_sidra_data(table = 7666, territorial_level = "state", geo_code = "35")Using SIDRA for quick tabulated results:
df <- pns_data(
year = 2019,
vars = c("C006", "C008", "C009", "J001", "J007", "J009", "V0024", "UPA_PNS")
)
# J001: Had a medical visit in the last 12 months?
# C006: Sex, C008: Age, C009: Race
access <- df |>
filter(J001 %in% c("1", "2")) |>
group_by(C006) |>
summarise(
visited = sum(J001 == "1"),
total = n(),
pct = visited / total * 100
)www.ibge.gov.br/estatisticas/sociais/saude/9160-pesquisa-nacional-de-saude)sidra.ibge.gov.br/pesquisa/pns)