Skip to contents

This function generates random sample sizes for each individual age based on the provided survey features. It first creates age bins, assigns each individual in the survey features to an age bin, calculates the overall sample size by group, and then generates random sample sizes for each age group. Finally, it returns a dataframe with the random sample sizes for each individual age.

Usage

sample_size_by_individual_age_random(survey_features)

Arguments

survey_features

A dataframe containing information about individuals' age ranges and sample sizes.

Value

A dataframe with random sample sizes generated for each individual age based on the provided survey features.