wle.stepwise(formula, data=list(), model=TRUE, x=FALSE, y=FALSE, boot=30, group, num.sol=1, raf="HD", smooth=0.031, tol=10^(-6), equal=10^(-3), max.iter=500, min.weight=0.5, type="Forward", f.in=4.0, f.out=4.0, method="WLE", contrasts=NULL, verbose=FALSE)
wle.stepwise
is called from.TRUE
the corresponding components of the fit (the model frame, the model matrix, the
response.)raf="HD"
: Hellinger Distance RAF,
raf="NED"
: Negative Exponential Disparity RAF,
raf="SCHI2"
: Symmetric Chi-Squared Disparity RAF.
tol
).type="Stepwise"
: the weighted stepwise methods is used,type="Forward"
: the weighted forward methods is used,
type="Backward"
: the weighted backward method is used.
method="WLS"
: the submodel parameters are estimated by weighted least square with weights from the weighted likelihood estimator on the full model.method="WLE"
: the submodel parameters are estimated by weighted likelihood estimators.
contrasts.arg
of model.matrix.default
.TRUE
warnings are printed.wle.stepwise
returns an object of class
"wle.stepwise"
.The function summary
is used to obtain and print a summary of the results.
The generic accessor functions coefficients
and residuals
extract coefficients and residuals returned by wle.stepwise
.The object returned by wle.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."Stepwise"
: the weighted stepwise methods is used, "Forward"
: the weighted forward methods is used, "Backward"
: the weighted backward method is used.Models for wle.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
.
min.weight
: the weighted likelihood equation could have more than one solution. These roots appear for particular situation depending on contamination level and type. The presence of multiple roots in the full model can create some problem in the set of weights we should use. Actually, the selection of the root is done by the minimum scale error provided. Since this choice is not always the one would choose, we introduce the min.weight
parameter in order to choose only between roots that do not down weight everything. This is not still the optimal solution, and perhaps, in the new release, this part will be change.
Agostinelli, C., (2000) Robust stepwise regression, Working Paper n. 2000.10 del Dipartimento di Scienze Statistiche, Universit\`a di Padova, Padova.
Agostinelli, C., (2002) Robust stepwise regression, Journal of Applied Statistics 29, 6, 825-840.
Agostinelli, C., (1998) Inferenza statistica robusta basata sulla funzione di verosimiglianza pesata: alcuni sviluppi, Ph.D Thesis, Department of Statistics, University of Padova.
Agostinelli, C., (1998) Verosimiglianza pesata nel modello di regressione lineare, XXXIX Riunione scientifica della Societ\`a Italiana di Statistica, Sorrento 1998.
library(wle)
# You can find this dataset in:
# Agostinelli, C., (2002). Robust model selection in regression
# via weighted likelihood methodology, Statistics &
# Probability Letters, 56, 289-300.
data(selection)
result <- wle.stepwise(ydata~xdata, boot=100, group=6, num.sol=3,
min.weight=0.8, type="Stepwise", method="WLS")
summary(result)
Run the code above in your browser using DataLab