![]() Otherwise it will name the variables A, B, C, etc. The firstrow option tells Stata that the first row of the spreadsheet contains the names of the variables. xlsx, but if you do it needs to be the right one. When you give the filename of the spreadsheet you do not need to include. Normally you tell Stata what data set you want to use with the use command, but if the data set is an Excel spreadsheet, use import excel instead. You can get the full data set from the GSS web site. Note that these files are subsets of the full GSS results. If you want to carry out the examples for this section, click on the following links to download a GSS sample in Excel format and a GSS sample in CSV format, then move them to your U:\SFS folder as described in Managing Stata Files. In this section we'll talk about how to import two of the most common kinds of data files: Excel spreadsheets and CSV (comma-separated variable) files. If you are new to Stata we strongly recommend reading all the articles in the Stata Basics section. This article is part of the Stata for Students series.
0 Comments
Leave a Reply. |