*! version 1.2 18 June 2019
help for neps queryversion 1.2 (18 June 2019)

Title

neps query -- Helper command to display all recorded preferences that the neps : prefix command might use.

Table of contents

Syntax
Options
Description
Remarks
Examples
Authors
Saved results
Also see

Syntax

Display previously set NEPS Scientific Use File parameters

neps query [* | _all | parameter [ parameter ... ] ] [, returnlocals]

returnlocals instead of returning results in r(), return as local macros

Description

The neps query command is a helper command to the neps : prefix command.
It displays previously recorded parameter preferences (e.g. using neps set) for the Stata session.

The basic syntax is

. neps set <parameter>

where <parameter> is the name of a parameter (e.g. "version").

Several <parameter> names can be placed in one invocation of neps query.
If no <parameter> is specified, or "*" or "_all" is specified, all previously recorded parameters will be displayed.

Options

Main

returnlocals is seldomly used.
If specified, query results will be returned as Stata local macros instead of values in r().

Only use this option with caution, as it will overwrite existent local macros, if any, without warning.

Remarks

Technically, neps query is no more than a wrapper for displaying global macros and their contents.
The name of a global that is queried is concatenated from the prefix "NEPS_" and the parameter name.

This means that invoking

. neps query version study

is equivalent to executing

. display `"${NEPS_version}"'

. display `"${NEPS_study}"'

However, neps query displays results in a nicely formatted table, and returns appropriate results in r().

This command is part of the NEPStools bundle, written to assist with the NEPS dataset files.

The source code of the program is licensed under the GNU General Public License version 3 or later. The corresponding license text can be found on the internet at http://www.gnu.org/licenses/ or in gnugpl.

Examples

Display the NEPS sub-study preference recorded in the Stata session:

. neps query study

Display the NEPS dataset version preference recorded in the Stata session:

. neps query version

Display the NEPS dataset file directory preference recorded in the Stata session:

. neps query directory

Do all of the above in one step:

. neps query study version directory

Display all recorded NEPS preferences at once:

. neps query

Authors

Daniel Bela (daniel.bela@lifbi.de), Leibniz Institute for Educational Trajectories (LIfBi), Germany.

Saved results

neps query saves the following in r(), unless option returnlocals is specified:

Local macros

r(<preference>) content of global macro ${NEPS_<preference>}

Also see

neps :, NEPStools