Skip to contents

Shifts choices so that the chosen zone will be automatically the first one for choice possibilities and distances.

Usage

shift_sort_x(x, ch, y, distance, alts, ab)

Arguments

x

Matrix of choice possibilities from create_logit_input.

ch

Data corresponding to actual zonal choice.

y

Data corresponding to actual catch.

distance

Data corresponding to distance.

alts

Number of alternative choices in model.

ab

Number of cost parameters + number of alts.

Value

d: matrix of choice possibilities and distance. IMPORTANT NOTE: both choice probabilities AND distances are sorted even though the column names for distances remain unchanged.