mle.stepwise(formula, data=list(), model=TRUE, x=FALSE, y=FALSE, type="Forward", f.in=4.0, f.out=4.0, contransts=NULL, verbose=FALSE)mle.stepwise is called from.TRUE the corresponding components of the fit (the model frame, the model matrix, the
response.)type="Stepwise": the stepwise methods is used,type="Forward": the forward methods is used,
type="Backward": the backward method is used.
contrasts.arg
of model.matrix.default.TRUE warnings are printed.mle.stepwise returns an object of class "mle.stepwise".The function summary is used to obtain and print a summary of the results.The object returned by mle.stepwise are:model=TRUE a matrix with first column the dependent variable and the remain column the explanatory variables for the full model.x=TRUE a matrix with the explanatory variables for the full model.y=TRUE a vector with the dependent variable.mle.stepwise are specified symbolically. A typical model has the form response ~ terms where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response. A terms specification of the form first+second indicates all the terms in first together with all the terms in second with duplicates removed. A specification of the form first:second indicates the the set of terms obtained by taking the interactions of all terms in first with all terms in second. The specification first*second indicates the cross of first and second. This is the same as first+second+first:second.
Beale, E.M.L., Kendall, M.G., Mann, D.W., (1967) The discarding of variables in multivariate analysis, Biometrika, 54, 357-366.
Efroymson, (1960) Multiple regression analysis, in Mathematical Methods for Digital Computers, eds. A. Ralston and H.S. Wilf, 191-203, Wiley, New York.
Garside, M.J., (1965) The best sub-set in multiple regression analysis, Applied Statistics, 14, 196-200.
Goldberger, A.S, and Jochems, D.B., (1961) Note on stepwise least squares, Journal of the American Statistical Association, 56, 105-110.
Goldberger, A.S., (1961) Stepwise least squares: Residual analysis and specification error, Journal of the American Statistical Association, 56, 998-1000.
library(wle)
data(hald)
cor(hald)
result <- mle.stepwise(y.hald~x.hald)
summary(result)
Run the code above in your browser using DataLab