Learn R Programming

SynthesizerPlus (version 0.4.0)

census_sim: Simulated census-like microdata

Description

A simulated data set of 5000 persons with the structure of census or household-survey microdata, used to illustrate synthetic data for statistical disclosure control. The records were generated with r_mvdist() (Gaussian copula with plausible correlations, see data-raw/census_sim.R in the package sources); they do not describe real people. Region names are the eight development regions of Romania; their shares only roughly follow the population distribution.

Usage

census_sim

Arguments

Format

A data frame with 5000 rows and 8 columns:

person_id

Direct identifier (character).

age

Age in years, 18--90 (integer).

sex

Factor: male, female.

region

Factor: development region (8 levels).

education

Ordered factor: primary < lower secondary < upper secondary < tertiary.

employment

Factor: employed, unemployed, inactive, retired.

household_size

Number of persons in the household (integer).

income

Monthly income in national currency (numeric).

Examples

Run this code
str(census_sim)
table(census_sim$employment, census_sim$sex)

Run the code above in your browser using DataLab