Next: stepstatus() Up: Regression Macros Help File Previous: steplook()   Contents

stepsetup()

Usage:
stepsetup([Model] [,silent:T] [,allin:T or in:logVec]), Model of form
  "y = x1+x2+...+xk" or "y = x1+x2+...+xk - 1", logVec a LOGICAL
  vector of length k



Keywords: stepwise regression, regression
stepsetup(Model), where Model is a CHARACTER scalar specifying a
regression model, initializes a stepwise regression process.

It creates invisible variable _STEPSTATUS and prints the F-to-enter
statistics and P-values for all the variables in the model.

It returns _STEPSTATUS as value.  This can be assigned (stuff <-
stepsetup("y=x1+x2+x3+x4")) but is not printed.  See topic
'_STEPSTATUS'.

stepsetup(), with no model specified, does the same, except it uses
STRMODEL, the model for the most recent GLM command, as model.

stepsetup([Model,] silent:T) does the same except nothing is printed.

stepsetup([Model,] allin:T [,silent:T]) does the same, except all the
variables are entered in the model immediately so that backward
stepwise regression can be done.

stepsetup([Model,] in:In [,silent:T]) does the same, except the
variables specified by In are entered in the model immediately.  In
must be a LOGICAL vector the same length as the number of independent
variables in Model.  Variable j is considered in the model if In[j] is
True.

When variables are initially entered in the model, stepsetup() 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.

Examples:
  Cmd> stepsetup("y=x1+x2+x3+x4+x5")
starts stepwise regression process with no variables in the model.

  Cmd> stepsetup("y=x1+x2+x3+x4+x5+x6-1",in:vector(F,F,F,T,T,T))
starts stepwise regression process with variables x4, x5 and x6 in the
model.  Because of "-1" in the model, no intercept is included.

See also stepstatus(), entervar(), removevar(), steplook().


Gary Oehlert 2003-01-15