11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

318 [ U ] 21 Inputting dataM,Joe Smith,288,14M,K Marx,238,12F,Farber,211,7begin data1.rawend data1.rawor this (which has variable names on the first line)sex, name, dept, divisionM,Joe Smith,288,14M,K Marx,238,12F,Farber,211,7begin data2.rawend data2.rawor this (which has one tab character separating the values):M Joe Smith 288 14M K Marx 238 12F Farber 211 7begin data3.rawend data3.rawThis looks odd because of how tabs work; data3.raw could similarly have a variable header, butinsheet cannot readM Joe Smith 288 14M K Marx 238 12F Farber 211 7begin data4.rawend data4.rawwhich has spaces rather than tabs.There is a way to tell data3.raw from data4.raw: Ask Stata to type the data and show the tabsby typing. type data3.raw, showtabsMJoe Smith28814MK Marx23812FFarber2117. type data4.raw, showtabsM Joe Smith 288 14M K Marx 238 12F Farber 211 721.2.5 If the dataset is formatted and the formatting is significantIf the dataset is formatted and formatting information is required to interpret the data, see [D] infile(fixed format) or [D] infix (fixed format).Using infix or infile with a data dictionary is something new users want to avoid if at allpossible.The purpose of this section is only to take you to the most complicated of all cases if there isno alternative. Otherwise, you should wait and see if it is necessary. Do not misinterpret this sectionand say, “Ah, my dataset is formatted, so at last I have a solution.”Just because a dataset is formatted does not mean that you have to exploit the formatting information.The following dataset is formatted

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!