samp: Sample Data for Heaping Correction Examples

sampR Documentation

Sample Data for Heaping Correction Examples

Description

A stratified random sample of demographic and income data from a synthetic population generated using the simPop package based on EU-SILC data. This dataset can be used to demonstrate and test heaping correction methods.

Usage

samp

Format

A data frame with 25 variables:

db030

Household ID

hsize

Household size

age

Age in years

rb090

Gender

db040

Region (Bundesland)

pid

Person ID

weight

Original sampling weight

pl031

Economic status

pb220a

Citizenship status

pb190

Marital status

pe040

Education level

pl111

Employment status

pgrossIncomeCat

Personal gross income category

pgrossIncome

Personal gross income

py010g

Employee cash or near cash income

py021g

Company car income

py050g

Self-employment income

py080g

Private pension income

py090g

Unemployment benefits

py100g

Old-age benefits

py110g

Survivor benefits

py120g

Sickness benefits

py130g

Disability benefits

py140g

Education-related allowances

.weight

Sampling weight from stratified sampling

Source

Generated using simPop from EU-SILC 2013 public use file. The full synthetic population can be regenerated using the script inst/scripts/create_pop.R.

See Also

eusilc13puf for the original data source.

Examples

data(samp)
head(samp)

# Check age distribution
hist(samp$age, breaks = 50, main = "Age Distribution")

# Introduce artificial heaping and correct it
age_heaped <- round(samp$age / 5) * 5
age_corrected <- correctHeaps(age_heaped, heaps = "5year")

heaping documentation built on Feb. 10, 2026, 1:08 a.m.