help for indeplist -------------------------------------------------------------------------------


indeplist -- Returns lists of independent variables from the active estimation command.


indeplist [, equation(equation list) local constant dropped]


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. By default the constant and all variables that were droped by Stata (due to multicolinearity) are not included in the list. This default can be overturned by specifying the the constant and/or the dropped option respectively.


equation(equation list) Specifies the equations from which the independent variables will be displayed. The equation name needs to be enclosed by quotation marks if the equation name contains spaces.

local Specifies that the lists of independent variables are stored in locals within the calling program's space. The locals are caled Xeqname, where eqname is the name of the equation with the spaces removed. indeplist will now also make a local called locnames that contains the names of the locals made by indeplist, except the local locnames itself. This option is primarily useful in combination with foreach.

constant Specifies that the constant is also treated as an independent variable and returned in the lists of independent variables. If this option is not specified the constant (_cons) will be removed from the lists of independent variables.

dropped Specifies that all variables that were dropped by Stata due to multicolinearity are still included in the list of variables.

Saved results

r(Xeqname) Contains the list of independent variables for equation eqname. Spaces are removed from eqname if the equation name constains spaces.


. mlogit rep78 price mpg . indeplist, eq(5) local . di r(X5) . di "`X5'"


Maarten L. Buis Vrije Universiteit Amsterdam Department of Social Research Methodology

Also see

Online: estimates foreach