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]

Re: st: labels and #delimit


From   Alan Neustadtl <[email protected]>
To   [email protected]
Subject   Re: st: labels and #delimit
Date   Mon, 16 Jan 2012 18:49:46 -0500

The line "-on-response/component not applicable"" is leading to the
error.  Remove it and your labels work fine.  It looks like Stata is
expecting a number here but not getting it.

Best,
Alan


On Mon, Jan 16, 2012 at 6:28 PM, Stephen Porter <[email protected]> wrote:
> 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/

*
*   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