Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Q re Quarterly Labour Force Survey

From   "Ada Ma" <>
Subject   Re: st: Q re Quarterly Labour Force Survey
Date   Sun, 5 Nov 2006 23:04:35 +0000

Thanks nick for the suggestion.  I have now have two list - one list
of variables which are in the dataset throughout the entire period,
and another list of variables which are not in every single quarter.
I am also using -summarize- instead of -ds- as I have read it
somewhere that it is somewhat slower to use ado files than native

A few years ago I did a analysis using all the quarters of the QLFS
from 1996 to 2002 and I had to have a different varlist for almost
every single quarter.  The current method is perhaps the solution
which gives me least pain, but unfortunately not the computer.

Warm regards,

On 11/4/06, Nick Cox <> wrote:
If the issue is which of a set of names is in another list,
then this is very inefficient, although you might be hard put
to notice that.

-ds- is an undocumented command written in Stata,
but as such implies an interpretative overhead which
is not needed here.

The -help- for -macrolists- gives details of various
list operators that should offer more direct solutions,
including intersection, union and difference.


Ada Ma

> Oooops - don't mind me, I think I have just figured out a solution
> after reading
> David Elliott's email.  I can put all the variables' names in a
> global, loop through the global list and -ds- each variable on the
> list, and if the return code is 0 then I add it to a final list, where
> I'll then use it to draw varibles out from the datasets.
> However if you have some good suggestions please fireaway
> anyway!  Cheers!!

On 11/4/06, Ada Ma <> wrote:

> > I want to draw out a set of variables from the QLFS from all 1992 to
> > 2005.  I can do a loop to loop through all the years and quarters,
> > however, getting the variables out is a bit tricky.
> >
> > Most of the variables keep the same name throughout the 14
> years, but
> > there are a good number where they had changed names, only appear in
> > Spring and Autumn and not others, only introduced some
> years after the
> > series started, etc.  For example gross pay is called GROSS99 from
> > 1999, but EMPGRO in years prior to that.  A Cohabitating dummy was
> > introduced in 2000.  Then new Standardised Occupational
> Classification
> > code was introduced in 2001.  These are just three out of
> many changes
> > that had been introduced to the data set through years.
> >
> > Is there anyway to get around this so that I may pull out all the
> > variables I would like to get, if they're available, without having
> > set up an unique varlist for each and every one of the datasets?
> > There are 57 quarters and quite a good number of variables
> I'd like to
> > pull out.  The alternative would be to append all 57
> quarters and then
> > pull out the vars, but the datasets are rather big so it's not an
> > option that is open to me given the computers I have access to.

*   For searches and help try:

Ada Ma
Research Fellow
Health Economics Research Unit
University of Aberdeen, UK.
Tel: +44 (0) 1224 553863
Fax: +44 (0) 1224 550926
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index