LIN 351 Week 6 HW:
Exporting your data to a .txt file and coding independent social variables

The next step is to export your coded tokens, along with the transcription and timestamps, to a .txt file for statistical analysis.

To export a file:

  1. In ELAN, choose Export as > Tab-delimited Text from the File menu. (If you are brave, you can experiment with the Export Multiple Files As function.)
  2. In the Select tiers box, click main speaker , tokens, and the tiers for all the variables you coded (dependent variable and independent linguistic variables).
  3. In Output options, click "Separate column for each tier" and "Repeat values..."
  4. In Include time column for, click "Begin Time" and click both the first box and "msec" for the time formats
  5. Click OK.
  6. Name the file SPEAKERCODE_YOURLASTNAME_YOURFIRSTNAME.txt or .xls or .xlsx when you save it.
  7. Follow the same process for all speakers that you coded.
  8. If you use the Export multiple files function, you then name the file YOURLASTNAME_YOURFIRSTNAME_LIN351_tokens.txt.

To prepare your data to turn in:

  1. Open each .txt file in Excel.
  2. In each of these files, create a new column to the left of the existing columns. Type the SpeakerCode (e.g., "F27W") into it and copy (fill) it down to every row.
  3. Then, paste these files, one below the other, into one Excel file. Make sure the same kind of information appears consistently in each column, for all the speakers.
  4. Provide informative column headers for every column. Create names with no spaces in them -- this is a useful convention for later working with the data in R.
  5. Save this new Excel file as YOURLASTNAME_YOURFIRSTNAME_LIN351_tokens.xls(x).
  6. Select All.
  7. From the Data menu, choose Sort.... Sort by "dependent variable."
  8. After sorting, delete all the rows that do NOT contain tokens. (They will have nothing in the "dependent variable" column, so it's easy to select them all and delete after you sort.)
  9. Then resort by Speaker Code and Timestamp (msec format).
  10. Create 3 more columns to the right of the existing columns. Label them "Sex", "Age" and "Ethnicity." Fill in the variable for each speaker appropriately. (You can use copy/paste or experiment with the "Left", "Mid" and "Right" or "VLookup" commands in Excel, referring to the column with the SpeakerCode that you created at the left edge. If you use one of these, then Copy and Paste Special > Values over the results so that the formula is not saved.) Remember that you have seen this information in the Sample Design table in Week 3 HW.
  11. Save As... YOURLASTNAME_YOURFIRSTNAME_LIN351_tokens.txt. (This is a tab-delimited text file format.)
  12. Submit this .txt file in Quercus.

[Return to top] [Return to syllabus]

Updated January 24, 2023