help parmest_varadd_opts(Roger Newson)

Variable-adding options for parmest and parmby

Syntax

msetype Variable containing parameter matrix stripe element type

omit Variable containing parameter omit status

empty Variable containing parameter empty cell status

label Variable containing X-variable labels

ylabel Variable containing Y-variable labels

idnum(#) Numeric dataset ID variable

idstr(string) String dataset ID variable

plower Variable containing lower one-tailed P-values

pupper Variable containing upper one-tailed P-values

stars(numlist) Variable containing stars for the P-value

emac(name_list) Variables containing macro estimation results

escal(name_list) Variables containing scalar estimation results

erows(name_list) Variables containing rows of matrix estimation results

ecols(name_list) Variables containing columns of matrix estimation results

evec(name_list) Variables containing vectors extracted from matrix estimation results

where name_list is a list of names of Stata estimation results.

Description

These options allow the user to add optional extra variables
to the output dataset (or resultsset) created by parmest or parmby.

Options

msetype specifies that a string variable named msetype is to be generated in the output dataset,
containing, in each observation, the matrix stripe element type
of the value of the variable parm in that observation.
The matrix stripe element type indicates the type of parameter corresponding to that observation,
and may be variable, error, factor, interaction, or product.

omit specifies that a variable named omit is to be generated in the output dataset,
containing, in each observation, the omit status of the parameter corresponding to that observation
(1 if the parameter is omitted, 0 otherwise).
A parameter is flagged as omitted because of collinearity with other parameters.
This happens in the case where a parameter corresponds
to the effect of a baseline level of a factor variable.

empty specifies that a variable named empty is to be generated in the output dataset,
containing, in each observation, the empty cell status of the parameter corresponding to that observation
(1 if the parameter corresponds to an empty cell, 0 otherwise).
A parameter is flagged as empty if it corresponds to an empty cell
in a frequency table of factor variables.
This happens in the case where a parameter corresponds
to the effect of a combination of levels of factor variables
which does not appear in the input data sample.

label specifies that a variable named label is to be generated in the output dataset,
containing, in each observation, a descriptive label for the corresponding parameter.
It is set to the variable label of the variable corresponding to the parameter name for that observation,
if such a variable exists in the pre-existing dataset and is unique.
For a parameter named
_cons, which is always a constant term in a model, the variable label is set to "Constant".
If the estimation command is lincomest (a version of lincom downloadable from SSC),
then label is set to the linear combination formula specified to lincomest,
truncated if necessary to the maximum length of a string variable
in the version of Stata currently being used,
which is stored in the c-class value c(maxstrvarlen).
Otherwise, label is set to an empty string ("").

ylabel specifies that a variable named ylabel is to be generated in the output dataset,
containing the variable labels of Y-variables.
This variable is generated as follows.
If the value of the estimation result e(depvar) is a single name belonging to an existing variable,
then all values of ylabel are set to its variable label.
Otherwise, the equation name corresponding to each parameter is checked
to ensure that it is a single name belonging to an existing variable.
If this is the case, then the value of ylabel corresponding to that parameter is set to its variable label.
Otherwise, the value of ylabel corresponding to that parameter is set to an empty string.

idnum(#) specifies an ID number for the output dataset.
It is used to create a numeric variable idnum in the output dataset, with that value for all observations.
This is useful if the output dataset is concatenated with other parmest or parmby output datasets
using append.

idstr(string) specifies an ID string for the output dataset.
It is used to create a string variable idstr in the output dataset, with that value for all observations.
This is useful if the output dataset is concatenated with other parmest or parmby output datasets
using append.
A parmest or parmby output dataset may contain a variable idnum,
a variable idstr, both, or neither.

plower specifies that a new variable will be created, with default name plower,
containing the lower one-sided P-values for the parameter estimates.

pupper specifies that a new variable will be created, with default name pupper,
containing the upper one-sided P-values for the parameter estimates.

stars(numlist) specifies a descending list of P-value thresholds.
If stars() is specified, then a string variable stars is created in the output dataset,
containing, in each observation, a string of stars whose length is equal to the number of
P-value thresholds in the list at least as large as the value of the P-value variable p
in that observation.
For instance, if the user specifies stars(0.05 0.01 0.001 0.0001),
then the variable stars will contain an empty string "" if p>0.05,
a single star "*" if 0.05>=p>0.01, two stars "**" if 0.01>=p>0.001,
three stars "***" if 0.001>=p>0.0001, and four stars "****" if p<=0.0001.
If the options plower or pupper are also specified,
then new string variables are created,
with default names starslower and starsupper, respectively,
containing stars for the lower and upper one-sided P-values, respectively.

emac(name_list) specifies a list of names of macro
estimation results to be stored as additional string variables in the output dataset.
These variables will be named em_1, ..., em_n, in the order in which they are
specified in the name_list.
Their values will be the values of the corresponding macro
estimation results, truncated if necessary to the maximum length of a string variable
in the version of Stata currently being used,
which is 244 characters in Stata Version 9).
For instance, if the user specifies emac(depvar command),
then the output dataset will contain a string variable em_1, equal in all observations to the value of the estimation result e(depvar),
and a string variable em_2, equal in all observations to the value of the estimation result e(command).

escal(name_list) specifies a list of names of scalar
estimation results to be stored as additional numeric variables in the output dataset.
These variables will be named es_1, ..., es_n,
in the order in which they are specified in the name_list.
Their values will be the values of the corresponding scalar estimation results.
For instance, if the user specifies escal(N N_clust),
then the output dataset will contain two numeric variables es_1 and es_2,
equal in all observations to the values of the estimation results
e(N) and e(N_clust), respectively.

erows(name_list) specifies a list of names of matrix
estimation results, whose rows will be stored as additional numeric variables
in the output dataset.
These variables will have default names of the form er_y_k, where y is the order
of the matrix in the name list and k is the row number.
For instance, if the user specifies erows(V), then the additional variables will be named
er_1_1, ..., er_1_n, where n is the number of rows of the variance matrix e(V),
and they will contain the rows of the variance matrix.
These additional variables, like all others in the output dataset, will have one observation per model parameter.
If the matrix rows are longer than the number of parameters, then the additional variables will be truncated.
If the matrix rows are shorter than the number of parameters, then the additional variables will be completed
with missing values.

ecols(name_list) specifies a list of names of matrix
estimation results, whose columns will be stored as additional numeric variables
in the output dataset.
These variables will have default names of the form ec_y_k, where y is the order
of the matrix in the name list and k is the column number.
For instance, if the user specifies ecols(V), then the additional variables will be named
ec_1_1, ..., ec_1_n, where n is the number of columns of the variance matrix e(V),
and they will contain the columns of the variance matrix.
These additional variables, like all others in the output dataset, will have one observation per model parameter.
If the matrix columns are longer than the number of parameters, then the additional variables will be truncated.
If the matrix columns are shorter than the number of parameters, then the additional variables will be completed
with missing values.

evec(name_list) specifies a list of names of matrix estimation results,
from which vectors will be extracted to be stored as additional numeric variables in the output dataset.
These variables will be named ev_1, ..., ev_n,
in the order in which the corresponding estimation results are specified in the name_list.
Their values will be extracted from the corresponding matrix
estimation results, and will be reformatted if necessary,
in order to fit in a variable with one observation per model parameter.
If the matrix is a square matrix with numbers of rows and columns equal to the
number of parameters in the model, then the corresponding output variable will
contain its vector diagonal.
Otherwise, if the matrix has a number of columns
equal to the number of parameters, then the corresponding output variable will
contain its first row.
Otherwise, if the matrix has a number of rows equal to the
number of parameters, then the corresponding output variable will contain its first column.
Otherwise, the corresponding output variable will contain its first
column, truncated or completed with missing values as necessary.
If the matrix estimation result does not exist, then the corresponding output variable will
be filled with missing values.
These rules may seem complicated, but are probably sensible.

Notes

The names of the extra variables created by these options, as given in the descriptions above,
are the default names.
They all may be changed by the user, using the
rename() option. (See parmest_varmod_opts.)
For more details on the variables in the output dataset (or resultsset)
created by parmest or parmby, see parmest_resultssets.

Author

Roger Newson, King's College London, UK.
Email: roger.newson@kcl.ac.uk

Also see

Manual: ,

[D] append, [R] lincom, [R] nlcom

Help: [U] 20 Estimation and postestimation commands,

[D] append, [R] lincom, [R] nlcom

parmest, parmby,
parmest_outdest_opts, parmest_ci_opts, parmest_varmod_opts,
parmby_only_opts, parmest_resultssets

lincomest if installed