Coding the questionnaires

So far, so good! Now it is time to transfer the actual responses from the questionnaire to Stata.

Edit data

Add this command in your do-file to open the data editor:

edit

Here you can simply add the responses (values) you have in your questionnaires. Note that if you have specified value labels, these will appear instead of the actual value:

Note
Some entries for comment has been truncated. Id 1=Lousy questionnaire; Id 5=I have nothing to add; Id 8=Too short.
Note
In the example above, you are not supposed to write the actual labels (e.g. “Man”, “Woman”) but rather insert the values each label corresponds to (e.g. 0 for “Man”, 1 for “Woman”).
Note
You can use the arrows on your keyboard to navigate the cells.

Do not forget to save the dataset. We have chosen to call it TestData1.dta. After saving, you can close the data editor

Note
Every change that you perform in the data editor generates the corresponding command in the Results window. It might be good to log these commands in order to be able to re-create the data at a later point (see Section 2.1.3 for more information about log files).

Browse data

Do you want to have a look at the data without editing? Then you can use this command:

browse

If you just want to browse specific variables or portions of the variable list, this can be specified after the command:

browse varname

or

browse varname varname varname

or

browse varname-varname

For example:

browse sex income
Note
You can also use browse together with if.
Note
An alternative to browse is list.