Variable-adding options for parmest and parmby
Syntax
options Description ------------------------------------------------------------------------- label Variable containing X-variable labels ylabel Variable containing Y-variable labels idnum(#) Numeric dataset ID variable idstr(string) String dataset ID variable 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
label specifies that a variable named label is to be generated in the output data set, containing the variable labels of variables corresponding to the parameter names, if such variables can be found in the existing dataset. 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 244 characters in Stata Version 9).
ylabel specifies that a variable named ylabel is to be generated in the output data set, 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, or using dsconcat if installed.
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, or using dsconcat if installed. A parmest or parmby output dataset may contain a variable idnum, a variable idstr, both, or neither.
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.
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, Imperial College London, UK. Email: r.newson@imperial.ac.uk
Also see
Manual: [U] 20 Estimation and postestimation commands, [D] append On-line: help for append, lincom, nlcom, estimation results help for parmest, parmby, parmest_outdest_opts, parmest_ci_opts, parmest_varmod_opts, parmby_only_opts, parmest_resultssets help for dsconcat, lincomest if installed