num_sim: Simulate single years from age/time category

Description Usage Arguments Details Value Examples

View source: R/num_sim.R

Description

Used to overcome the loss of variables (age, time since quit) in single years in the Health Surveys for England 2015+.

Usage

1

Arguments

x

Character - the age/time category e.g. "15-20".

Details

Takes a category with beginning and end separated by "-" and randomly assigns each observation a number within the age category.

Value

Returns an integer.

Examples

1
num_sim("15-20")

dosgillespie/hseclean documentation built on May 2, 2020, 1:15 a.m.