-------------------------------------------------------------------------------help parmest_varadd_opts(Roger Newson) -------------------------------------------------------------------------------

Variable-adding options forparmestandparmby

Syntax

optionsDescription -------------------------------------------------------------------------labelVariable containingX-variable labelsylabelVariable containingY-variable labelsidnum(#)Numeric dataset ID variableidstr(string)String dataset ID variablestars(numlist) Variable containing stars for theP-valueemac(name_list)Variables containing macro estimation resultsescal(name_list)Variables containing scalar estimation resultserows(name_list)Variables containing rows of matrix estimation resultsecols(name_list)Variables containing columns of matrix estimation resultsevec(name_list)Variables containing vectors extracted from matrix estimation results -------------------------------------------------------------------------where

name_listis a list of names of Stata estimation results.

DescriptionThese options allow the user to add optional extra variables to the output dataset (or resultsset) created by

parmestorparmby.

Options

labelspecifies that a variable namedlabelis 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 variablelabelis set to "Constant". If the estimation command islincomest(a version oflincomdownloadable from SSC), thenlabelis set to the linear combination formula specified tolincomest, 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).

ylabelspecifies that a variable namedylabelis to be generated in the output data set, containing the variable labels ofY-variables. This variable is generated as follows. If the value of the estimation resulte(depvar)is a single name belonging to an existing variable, then all values ofylabelare 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 ofylabelcorresponding to that parameter is set to its variable label. Otherwise, the value ofylabelcorresponding 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 variableidnumin the output dataset, with that value for all observations. This is useful if the output dataset is concatenated with otherparmestorparmbyoutput datasets usingappend, or usingdsconcatif installed.

idstr(string)specifies an ID string for the output dataset. It is used to create a string variableidstrin the output dataset, with that value for all observations. This is useful if the output dataset is concatenated with otherparmestorparmbyoutput datasets usingappend, or usingdsconcatif installed. Aparmestorparmbyoutput dataset may contain a variableidnum, a variableidstr, both, or neither.

stars(numlist)specifies a descending list ofP-value thresholds. Ifstars()is specified, then a string variablestarsis created in the output dataset, containing, in each observation, a string of stars whose length is equal to the number ofP-value thresholds in the list at least as large as the value of theP-value variablepin that observation. For instance, if the user specifiesstars(0.05 0.010.001 0.0001), then the variablestarswill contain an empty string""ifp>0.05, a single star"*"if0.05>=p>0.01, two stars"**"if0.01>=p>0.001, three stars"***"if0.001>=p>0.0001, and four stars"****"ifp<=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 namedem_1, ...,em_n, in the order in which they are specified in thename_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 specifiesemac(depvar command), then the output dataset will contain a string variableem_1, equal in all observations to the value of the estimation resulte(depvar), and a string variableem_2, equal in all observations to the value of the estimation resulte(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 namedes_1, ...,es_n, in the order in which they are specified in thename_list. Their values will be the values of the corresponding scalar estimation results. For instance, if the user specifiesescal(N N_clust), then the output dataset will contain two numeric variableses_1andes_2, equal in all observations to the values of the estimation resultse(N)ande(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 former_y_k, whereyis the order of the matrix in the name list andkis the row number. For instance, if the user specifieserows(V), then the additional variables will be nameder_1_1, ...,er_1_n, wherenis the number of rows of the variance matrixe(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 formec_y_k, whereyis the order of the matrix in the name list andkis the column number. For instance, if the user specifiesecols(V), then the additional variables will be namedec_1_1, ...,ec_1_n, wherenis the number of columns of the variance matrixe(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 namedev_1, ...,ev_n, in the order in which the corresponding estimation results are specified in thename_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.

NotesThe 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. (Seeparmest_varmod_opts.) For more details on the variables in the output dataset (or resultsset) created byparmestorparmby, seeparmest_resultssets.

AuthorRoger Newson, Imperial College London, UK. Email: r.newson@imperial.ac.uk

Also seeManual:

[U] 20 Estimation and postestimation commands,[D] appendOn-line: help forappend,lincom,nlcom, estimation results help forparmest,parmby,parmest_outdest_opts,parmest_ci_opts,parmest_varmod_opts,parmby_only_opts,parmest_resultssetshelp fordsconcat,lincomestif installed