Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: labels and #delimit


From   Stephen Porter <[email protected]>
To   [email protected]
Subject   st: labels and #delimit
Date   Mon, 16 Jan 2012 18:28:03 -0500

Hi all,

I'm trying to use a dataset created by the Dept of Education, using the do
files they provide to researchers. The data loads fine; however, the value
labels do not seem to work.

Here is a sample of the code:

infile using "C:\data\student.dct"
#delimit ;
  label define F0001_
    0 "No"
    1 "Yes"
    -7 "Item legitimate skip/NA"
    -on-response/component not applicable"
    -9 "Missing"
   ;
  label define F0002_
    0 "No"
    1 "Yes"
    2 "Haven't decided yet"
    3 "Don't know what a test for the IB is"
    -7 "Item legitimate skip/NA"
    -8 "Unit non-response/component not applicable"
    -9 "Missing"
   ;
  label define F0003_
    0 "No"
    1 "Yes"
    2 "Haven't decided yet"
    3 "Don't know what an Adv Placement test is"
    -7 "Item legitimate skip/NA"
    -8 "Unit non-response/component not applicable"
    -9 "Missing"
   ;
#delimit cr

The command 'label dir' returns nothing when this code is run; in fact,
no commands in the do file will run after the label section. Each label
runs fine when entered on the command line, so I figure it must be
something with the delimiter.

Thanks,
Steve

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index