Description Usage Arguments Value Examples
View source: R/mnl_model_functions.R
This function allows the user to convert a 3-dimensional design array into a tibble, which helps for readability and to plot.
1 | mnl_design_array_to_dataframe(des_array, names = NULL)
|
des_array |
must be a 3-dimensional design array of dimension (k, J, S) where k is the number of variables, J the number of alternatives in each choice set and S is the number of choice sets. |
names |
Names of the |
Returns a tibble with (k+1)
columns where the first k
columns are the variables and the (k+1)
-th column is the choice set.
1 2 3 | design_array_to_dataframe(mnl_create_random_initial_design(q = 3, J = 2, S = 4)
design_array_to_dataframe(mnl_create_random_initial_design(q = 3, J = 2, S = 4), names = c("v1", "v2", "v3", "cs"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.