add_one_categorical: Generate linear predictor from logistic model
Description
An internal function not intended for the user. Given a dataset and multinomial regression parameters,
generates a categorical variable and adds it to the dataset.
Usage
add_one_categorical(.d, n, obs, cat.parameters)
Arguments
.d
The dataset to which to add the categorical variable.
n
The number of clusters.
obs
The number of observations per cluster.
cat.parameters
A dataframe of parameters for generating the categorical variable. See Details.
# NOT RUN {# mini dataset with 3 observations per persondata = data.frame( male = rep( rbinom(n=10, size=1, prob=0.5), each=3 ) )
add_one_categorical( data, 10, 3, cat.params)
# }