Edit and Browse in Stata

We know that we can use the Data Editor (Edit) in Stata to enter and edit our dataset. However, we can also use the command edit to do that. Similarly, the Data Editor (Browse) will allow you to browse the data, and the command browse will allow you to do the same thing.

In this post, I use automobile dataset to demonstrate.


1. edit command

By using the command edit, you can choose the variables you would like to see and edit. For example, in the command pane, if I type:

Stata will provide the table which is opened from the Data Editor (Edit):

This is a table that displays the price and if it is a domestic vehicle. We know that foreign is a categorical variable with two categories: Domestic and Foreign. The variable foreign takes on the numeric values 0 and 1, with 0 representing Domestic and 1 representing Foreign. Therefore, if you would like to see the value rather than the variable's label, we can add the nolabel command after a comma:


As shown above, now Stata only shows the variable's values rather than label.

When make changes to the value of the variable in Editor, Stata will ask you if you want to save the changes you made. You can save your changes, and then close the Editor.


2. browse command

When you use the command browse, Stata will provide the table with the variable you would like to see. However, you will not be able to edit the data. For example, in the command pane, I type:

Stata will provide the table with the price values for the first 8 observations, however, it is in Browse mode, which means that you cannot make changes to your data:


© 2020 by Survey Design and Analysis Services. 

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube