swap | R Documentation |
Swaps the order of the attributes to create a new design candidate. For example, if the attributes in the first and fourth choice situation (row) are swapped, then (1, 2, 1, 3, 2, 3) becomes( 3, 2, 1, 1, 2, 3).
swap(x)
x |
A vector of attribute levels |
The algorithm randomly samples 2 row positions that are swapped and the swaps are independent across attributes and alternatives
Hensher, D. A., Rose, J. M. & Greene, W., 2005, Applied Choice Analysis, 2nd ed., Cambridge University Press
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.