proportion_gen: Generation of random cumulative proportions

View source: R/proportion_gen.R

proportion_genR Documentation

Generation of random cumulative proportions

Description

Creates a list of vectors, each containing the randomly generated cumulative proportions of a discrete variable.

Usage

proportion_gen(cat_options, n_cat_options)

Arguments

cat_options

vector of response types.

n_cat_options

vector of number of items of the corresponding response type.

Details

cat_options and n_cat_options must be the same length. cat_options = 1 is a continuous variable.

The result from proportion_gen can be used directly with the cat_prop argument of questionnaire_gen.

Examples

proportion_gen(cat_options = c(1, 2, 3), n_cat_options = c(2, 2, 2))
proportion_gen(cat_options = c(1, 3), n_cat_options = c(4, 5))


lsasim documentation built on Aug. 22, 2023, 5:09 p.m.