simulated.census {corpora} | R Documentation |
Simulated census data for examples and illustrations (corpora)
Description
This function generates a large simulated census data frame with body measurements (height, weight, shoe size) for male and female inhabitants of a highly fictitious country.
The generated data set is usually named FakeCensus
(see code examples below)
and is used for various exercises and illustrations in the SIGIL course.
Usage
simulated.census(N=502202, p.male=0.55, seed.rng=42)
Arguments
N |
population size, i.e. number of inhabitants of the fictitious country |
p.male |
proportion of males in the country |
seed.rng |
seed for the random number generator, so data sets with the same parameters ( |
Details
The default population size corresponds to the estimated populace of Luxembourg on 1 January 2010 (according to https://en.wikipedia.org/wiki/Luxembourg).
Further parameters of the simulation (standard deviation, correlations, non-linearity) will be exposed as function arguments in future releases.
Value
A data frame with N
rows corresponding to inhabitants and the following columns:
height
:body height in cm
height
:body weight in kg
shoe.size
:shoe size in Paris points (Continental European scale)
sex
:sex, either
m
orf
Author(s)
Stephanie Evert (https://purl.org/stephanie.evert)
Examples
FakeCensus <- simulated.census()
summary(FakeCensus)