entervar(var1 [,var2 ...] [,silent:T]), var1, var2, ... the names or numbers of independent variables in the complete stepwise model but not in the current stepwise model |

entervar(NewVar) enters independent variable Var to the current stepwise regression model. NewVar can either be a quoted name ("z3"), an unquoted name (z3) or the number of a variable in the complete stepwise model but not in the current stepwise model. Thus if the full model is "y=x1+x2+x3+x4+x5", entervar(x2), entervar("x2") and entervar(2) are equivalent. It is an error if NewVar is not an independent variable in the complete stepwise model or if it has already been entered in. Invisible variable _STEPSTATUS is updated to reflect the changed model. See topic '_STEPSTATUS'. The F-to-remove statistics with P-values are printed for all the variables in the model, including NewVar, and F-to-enter statistics with P-values are printed for any variables in the full model that have not yet been entered. In addition, entervar() prints an overall F statistic and its P-value, Mallow's Cp statistic, adjusted R^2 and R^2. The F-statistic tests the null hypothesis that the coefficients of the "in" variables are 0. Because the "in" variables have been selected because they appear to contributed importantly to the regression, the P-value should not be interpreted literally. The value, which can be assigned (stuff <- entervar(x3)) but is not printed, is a copy of the updated invisible variable _STEPSTATUS. entervar(Var1, Var2 ...) does the same except that more than one variable is entered. The model and other statistics are printed after each variable is entered. The value returned is _STEPSTATUS after all have been entered. An example when the full model is "y=x1+x2+x3+x4+x5" might be entervar(x1,"x2",4). This would enter x1, x2 and x4 in that order. entervar(Var1 [, Var2 ...], silent:T) does the same, except that the model and summary statistics are not printed. You can then use stepstatus() to print the summary statistics for the new current state of the stepwise regression process. See also removevar(), stepsetup(), stepstatus()

Gary Oehlert 2003-01-15