indeplist: Stata program displaying and returning the names of the independent variables of the active estimation command.

Author: Maarten L. Buis

Description

indeplist displays the names of the independent variables of the active estimation command. Separate list will be displayed if the estimation command contains multiple equations, unless the equation option is specified. In that case only lists of independent variables from the equations specified in the equation option will be displayed.

This package can be installed by typing in Stata: ssc install indeplist

Supporting material

Example

. sysuse auto, clear (1978 Automobile Data)

. mlogit rep78 price mpg

Iteration 0: log likelihood = -93.692061 Iteration 1: log likelihood = -84.981843 Iteration 2: log likelihood = -83.773089 Iteration 3: log likelihood = -83.701178 Iteration 4: log likelihood = -83.697902 Iteration 5: log likelihood = -83.697882 Iteration 6: log likelihood = -83.697882

Multinomial logistic regression Number of obs = 69 LR chi2(8) = 19.99 Prob > chi2 = 0.0104 Log likelihood = -83.697882 Pseudo R2 = 0.1067

------------------------------------------------------------------------------ rep78 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 1 | price | -.0006468 .000849 -0.76 0.446 -.0023108 .0010173 mpg | -.0197515 .1959901 -0.10 0.920 -.4038851 .364382 _cons | 1.013502 6.695462 0.15 0.880 -12.10936 14.13637 -------------+---------------------------------------------------------------- 2 | price | -.0001017 .000177 -0.57 0.566 -.0004486 .0002452 mpg | -.0527552 .1153556 -0.46 0.647 -.2788479 .1733375 _cons | .3244272 2.936738 0.11 0.912 -5.431473 6.080328 -------------+---------------------------------------------------------------- 4 | price | .0000517 .0001216 0.42 0.671 -.0001867 .0002901 mpg | .1113209 .0732537 1.52 0.129 -.0322538 .2548955 _cons | -3.112858 2.024444 -1.54 0.124 -7.080694 .8549794 -------------+---------------------------------------------------------------- 5 | price | .000228 .0001562 1.46 0.144 -.0000781 .0005342 mpg | .2993637 .0907369 3.30 0.001 .1215226 .4772049 _cons | -9.22122 2.79555 -3.30 0.001 -14.7004 -3.742042 ------------------------------------------------------------------------------ (rep78==3 is the base outcome)

. indeplist, eq(5) local Independent variables in equation 5: price mpg

. di r(X5) price mpg

. di "`X5'" price mpg

[do-file]