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: RE: Refer to specific BLOCK of data for reading in ASCII


From   Michael Boehm <michael.boehm1@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Refer to specific BLOCK of data for reading in ASCII
Date   Fri, 7 Jan 2011 13:46:26 +0000

Thanks for your answer. I have figured out what my problem was. There
were 15 lines of data for one observation (i.e. individual) and I have
to tell that to Stata as well as to refer it to the respective line
I'm interested in for my variable. Hence, the dictionary code for
reading in variable F4UNIV1 from the NELS Student-Level Data, for
example, becomes

dictionary using 03955-0001-Data.txt

{
_lines(15)
_line(1) _column(8) float f4univ1 %4f "Sample member status in all five waves"

}

Thanks,
Michael


On Fri, Jan 7, 2011 at 1:17 PM, Nick Cox <n.j.cox@durham.ac.uk> wrote:
> I don't know what a block is precisely, or why you think we can work that out from this description, but more importantly I don't think dictionaries work with any concept of block.
>
> -infile- can be combined with -if- or -in-, which may allow progress.
>
> Otherwise reading the whole lot in and selecting what you want seems advised. I realise that there may be memory issues.
>
> A concrete example showing what you mean would help (me) greatly.
>
> Nick
> n.j.cox@durham.ac.uk
>
> Michael Boehm
>
> I want to read in data from the National Education Longitudinal Study,
> which is in ASCII format with multiple blocks of numbers rather than
> one. I want to tell Stata to look for a specific column in a specific
> block, the first of which is not hard but the second I cannot figure
> out. For example, how should I amend a dictionary of the form
>
> dictionary using 03955-0001-Data.txt
> {
> _column(8) float f4univ1 %4f "Sample member status in all five waves"
> }
>
> to tell Stata to look for f4univ1 in _column(8) of block 1 out of 15?
>
>
> *
> *   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