Stata 15 help for _eqlist

Title

[P] _eqlist -- General-purpose class for managing equation specifications

Syntax

Declare an _eqlist object

.obj = ._eqlist.new [, reset_options]

Reset parse settings

.obj.reset [, reset_options]

Parse the command line

.obj.parse command_line

where command_line is

eqlist [if] [in] [weight] [, global_options]

eqlist is one or more of the following equation specifications

[eqid:] [depvars [=]] [indepvars] [if] [in] [weight] [, equation_options]

and multiple equations are assumed to be bound in parentheses or delimited by ||.

Report the number of parameters to s(value):

.obj.dim

Mark the estimation sample:

.obj.markout [varname] [, markout_options]

Remove collinear predictors:

.obj.rmcoll [varname] [, markout_options]

Rebuild the command line:

.obj.rebuild [, rebuild_options]

reset_options Description ------------------------------------------------------------------------- eqopts(opt_name) on/off options to recognize in an equation specification eqargopts(opt_name) options with arguments to recognize in an equation specification needvarlist equation specifications require a varlist commonopts(opt_spec) options not specific to equations markopts(opt_name) options taking a varlist that should be marked for the estimation sample rmcollopts(opt_name) options taking a varlist that should be checked for collinear variables rmdcollopts(opt_name) options taking a varlist with depvars that should be checked for collinear variables numdepvars(#) minimum number of depvars required in each equation specification; default is 1 needequal an equal sign is required for separating the depvars from the indepvars wtypes(weight_types) allowed weight types; default is none ignorecons ignore noconstant option ------------------------------------------------------------------------- opt_spec is an option specification as in syntax. opt_name is the name of an option for the .parse routine to identify. Use capital letters to specify minimum abbreviations as in syntax.

markout_options Description ------------------------------------------------------------------------- replace replace the values in varname; default is to assume varname is a new variable alldepsmissing only mark out observations in which all the depvars in an equation contain missing values -------------------------------------------------------------------------

rebuild_options Description ------------------------------------------------------------------------- parentheses bind equations in parentheses; default for specifications with two or more equations unparfirsteq do not bind the first equation in parentheses or delimit equations with || instead of binding them in parentheses equal separate depvars from the indepvars with an equal sign unequalfirsteq do not put an equal sign in the first equation -------------------------------------------------------------------------

Description

_eqlist is a programmer's tool for parsing equation specifications.

Options for .new and .reset

eqopts(opt_name) identifies on/off options to recognize when parsing command_line. If you supply the noconstant option in eqopts(), the .parse routine will verify that there are indepvars present whenever the noconstant option is specified in an equation.

Use capital letters to specify minimum abbreviations as in syntax.

eqargopts(opt_name) identifies options with arguments to recognize when parsing command_line. If you supply offset or exposure, the .markout routine will include the offset or exposure variable for identifying the estimation sample whenever one is specified in an equation.

needvarlist requires a varlist in each equation specification.

commonopts(opt_spec) identifies global options that are not equation specific.

markopts(opt_name) identifies options that accept a varlist in its arguments. The .markout routine will include the variables for identifying the estimation sample.

rmcollopts(opt_name) identifies options that accept a varlist in its arguments. The .rmcoll routine will drop collinear variables from varlist.

rmdcollopts(opt_name) identifies options that accept an equation specification with depvars and indepvars in its arguments. The .rmcoll routine will drop collinear variables from the indepvars.

numdepvars(#) specifies the minimum number of depvars allowed within an equation.

needequal specifies that the equal sign is required to separate the depvars from the indepvars within each equation.

wtypes(weight_types) specifies which weight types are allowed to be specified in command and determines the default weight type. weight_types is a list of weight types accepted by syntax. If wtypes() is not specified, the default is wtypes(fw aw pw iw).

ignorenocons specifies that .parse and .rmcoll ignore the noconstant option if it is specified in any of the equations. This option is seldom used.

Options for .markout and .rmcoll

replace indicates that varname exists. varname is assumed to be a new variable name if replace is not specified.

alldepsmissing indicates that only observations in which all the depvars within an equation are missing are to be marked out from the estimation sample. See intreg for an example estimation command that accepts missing values in its depvars so long as it is not both in the same observation.

Options for .rebuild

parentheses causes all the equations to be bound in parentheses. This is the default behavior when two or more equations are specified.

unparfirsteq prevents the first equation from being bound in parentheses, even when the parentheses option is specified. See ivregress for an estimation command where this option would be required.

or causes the equations to be separated by || instead of being bound in parentheses.

equal causes the equal sign to delimit depvars from indepvars in all the equations.

unequalfirsteq prevents the equal option from having an effect in the first equation. See ivregress for an estimation command where this option would be required.


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