Identify choice patterns

identify_choice_patterns(db, str_id, str_ct, str_choice, sq_alt)

Arguments

db

A data.frame or tibble

str_id

A character string giving the name of the individual id variable

str_ct

A character string giving the name of the choice task variable

str_choice

A character string giving the name of the choice variable

sq_alt

A number giving the alternative (in the choice variable) corresponding to the status quo or opt out

Value

A vector the length of rows in `db` with value equal to 1 if an individual always chose the SQ or opt out alternative