Description Usage Arguments Examples
This function converts a factor variable into an integer vector, which is useful for coding factors in the Stan programming language. Note that addNA() is the default, so if NAs exist in the factor, they will be included in the resulting vector as their own integer value.
1 |
factor |
A factor. |
1 | to_stan_factor(my.factor)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.