prepare_data | R Documentation |
The function checks that the data is supplied as a data.frame or tibble and that it contains an equal number of choice observations per individual.
prepare_data(db, str_id, str_ct, n_id, n_ct, cores, check_data)
db |
A |
str_id |
A character string giving the name of the id variable |
str_ct |
A character string giving the name of the ct variable |
n_id |
An integer giving the nubmer of respondents |
n_ct |
An integer giving the number of choice situations |
cores |
An integer indicating the number of cores to use in estimation |
check_data |
A boolean eqaul to TRUE if the code should skip the data checks on number of choice tasks per individual. |
NOTE: While padding allows the use of fast matrix operations, it may come at the cost of disproportionate memory use for large datasets with many observations and variables.
A data.frame
padded with NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.