simRef: Generate Reference Properties for a Hypothetical Population

View source: R/simRef.R

simRefR Documentation

Generate Reference Properties for a Hypothetical Population

Description

This function simulates a dataset representing physical characteristics (hair color, skin color, eye color) of a hypothetical population, based on conditional probability distributions. The size of the simulated population can be adjusted by the user.

Usage

simRef(n = 1000, seed = 1234)

Arguments

n

The number of individuals in the simulated population.

seed

Selected seed for simulations.

Value

A data.frame with three columns: hair_colour, skin_colour, and eye_colour, each representing the respective characteristics of each individual in the sample population. The hair color is simulated based on predefined probabilities, and skin and eye colors are generated conditionally based on the hair color.

Examples

simRef(1000) # Generates a data frame with 1000 entries based on the defined distributions.

mispitools documentation built on Sept. 11, 2024, 8:29 p.m.