swap {spdesign}R Documentation

Swapping of attribute

Description

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).

Usage

swap(x)

Arguments

x

A vector of attribute levels

Details

The algorithm randomly samples 2 row positions that are swapped and the swaps are independent across attributes and alternatives

References

Hensher, D. A., Rose, J. M. & Greene, W., 2005, Applied Choice Analysis, 2nd ed., Cambridge University Press


[Package spdesign version 0.0.3 Index]