Since we need to convert the data from a wide format to a long format, this is why the command that we wrote was reshape long. After that, we have to specify the names of the variables which are in the wide format. In our dataset, there are 2 variables which are INC and UE. Both of these variables have a numeric part. That numeric part is what we call the variable J. We specify this J variable in the option j(new variable). In our dataset, there is no variable with the name year, however, we wrote the option j(year) so that a new variable is created for the numeric values of 80, 81, and 82. We also specified option i(id), where option i needs an existing variable that is a unique panel identifier.
To practice the above yourself, here is the source data and code.
use http://www.stata-press.com/data/r15/reshape1 list reshape long inc ue, i(id) j(year) list
Reshape long to wide
Continuing from the previous example, we can reshape the data back to wide format by