Description Usage Arguments Examples
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.
1 | add_one_categorical(.d, n, obs, cat.parameters)
|
.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. |
1 2 3 | # mini dataset with 3 observations per person
data = data.frame( male = rep( rbinom(n=10, size=1, prob=0.5), each=3 ) )
add_one_categorical( data, 10, 3, cat.params)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.