![]() ![]() To practice the above yourself, here is the source data and code. We also specified option i (id), where option i needs an existing variable that is a unique panel identifier. 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 specify this J variable in the option j(new variable). That numeric part is what we call the variable J. More generally, any variable that varies across both i() and j() variables either needs to be dropped before reshape wide or be included in the data variable. ![]() Both of these variables have a numeric part. In our dataset, there are 2 variables which are INC and UE. After that, we have to specify the names of the variables which are in the wide format. 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. If we wish to convert it to a long format, such as the one given below, +-+ The above structure is known as the wide format. Suppose we have the data in the following format +-+ ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |