generating variable in stata ??
In the data set, the “alternative” variable consists of 4 modes including pier, private, beach and charter.
I want to generate new variable y as follows:
we collapse the model to three alternatives and order the alternatives, with y = 0 if fishing from a pier or beach, y = 1 if fishing from a private boat and y = 2 if fishing from a charter.
I want to generate y in STATA