i

<< Previous         Index         Next >>


Frequency table construction

4. Reading Excel data into Stata

To read the data into Stata, we can use (like in R) menus or the command line.
At the menus we have − > Import − > Text delimited data :

It is important to remember in which folder we have saved the Excel file to be able to browse the file and import it.
We can also do it from the command line. We have first to tell Stata which is the folder where we have saved the file. For instance:
. cd “C:\Documents and Settings\kwelch\Desktop\stata”

We can next import the data using the following command:
. import delimited age

Notice that Stata already searches a file with "csv" extension, without having to specify it. To verify that the data have been imported correctly, we can ask Stata to show us the data:
. browse

We should see the same data that we had in the Excel file.

<< Previous         Index         Next >>




File translated from TEX by TTH, version 4.08.