Stata 15 help for _pb_exp_list


[P] _pb_exp_list -- General-purpose class for managing parenthesis-bound expression lists


Declaring a _pb_exp_list object

.obj =, stub(name) [reset_options]

Resetting your _pb_exp_list object

.obj.reset, stub(name) [reset_options]

Parsing the expression list

.obj.parse [name:] exp [, eform_option passthru_options]

.obj.parse [([name:] exp) ...] [, eform_option passthru_options]

Computing point and variance estimates

.obj.compute b V

Posting the expressions to e()


reset_options Description ------------------------------------------------------------------------- * stub(name) stub for default name generation eqstub(name) stub for default equation name generation cmdname(name) name of assumed estimation command ------------------------------------------------------------------------- * stub() is required.


_pb_exp_list is a programmer's tool for managing expressions bound in parentheses. Each expression is assumed to be a function of the parameter estimates in e(b) from an estimation command.

.obj.reset restores the elements in .obj as if it were newly created.

.obj.parse parses the list of expressions.

.obj.compute uses the current estimation results in e() to compute the requested point and variance estimates. .compute uses nlcom to perform this task. Each element of e(b) from the current estimation results is included among the list of expressions.

.obj.post_legend stores the expressions in e().

Options for .new and .reset

stub(name) specifies the stub used for automatic name generation. The stub is used when a name is not specified or for resolving conflicted names. stub() is required.

eqstub(name) specifies the stub for automatic equation name generation. This equation stub is used only when one or more expressions are specified. The default is eqstub(_eq_).

cmdname(name) specifies which estimation command's results will be used. This option gives the ability to produce error messages when an invalid eform_option is specified.


Make a new object

. .o =, stub(exp_) eqstub(eq_) cmdname(logit)

Parse an expression

. .o.parse (odiff: exp(_b[turn])-exp(_b[trunk])), or

Fit a model

. logit foreign mpg turn trunk displ head

Compute the value for our expression

. .o.compute b V

Post the expressions to e()

. .o.post_legend

Stored results

.obj.parse returns the following in r():

Scalars r(k_exp) number of specified expressions

Macros r(eform) parsed eform_option for replaying underlying point estimates r(options) other options for caller to parse

.obj.post_legend returns the following in e():

Scalars e(k_exp) total number of expressions, including implied expressions from underlying e(b)

Macros e(exp#) #th expression

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