glmrobMT is used to fit generalized linear models by robust MT
method. The model is specified by the x and y
components and a description of the error distribution. Currently,
only implemented for family=poisson.
glmrobMT(x, y, weights=NULL, start=NULL, offset=NULL,
family=poisson(), weights.on.x="none",
control=glmrobMT.control(), intercept=TRUE, trace.lev=1,
include.cubinf=TRUE, m.approx=NULL, mprime.approx=NULL, ...)design matrix of dimension \(n \times p\).
vector of observations of length n.
an optional vector of weights to be used in the fitting process (in addition to the robustness weights computed in the fitting process).
starting values for the parameters in the linear predictor.
Note that specifying start skips the computation of
the initial estimates, but needs to be robust itself.
this can be used to specify an a priori known component to be included in the linear predictor during fitting. At the moment it is not used.
a character string (can be abbreviated), a function or
list (see below), or a numeric vector of length
n, specifying how points (potential outliers) in x-space are
downweighted. If "hat", weights on the design of the form
\(\sqrt{1-h_{ii}}\) are used, where \(h_{ii}\) are the diagonal
elements of the hat matrix. If "robCov", weights based on
the robust Mahalanobis distance of the design matrix (intercept
excluded) are used where the covariance matrix and the centre is
estimated by cov.rob
from the package MASS.
Similarly, if "covMcd", robust weights are computed using
covMcd. The default is "none".
If weights.on.x is a function, it is called
with arguments (X, intercept) and must return an n-vector of
non-negative weights.
If it is a list, it must be of length one, and as
element contain a function much like covMcd() or
cov.rob() (package MASS), which computes
multivariate location and “scatter” of a data matrix X.
a list of parameters for controlling the fitting process.
See the documentation for glmrobMT.control for
details.
logical indicating if an intercept at the first column of x
is present. This information is only used when weights.on.x
is not set to none.
logical (or integer) indicating if intermediate results
should be printed; defaults to 0 (the same as FALSE).
logical, if TRUE the cubinf
is also used as possibile starting value.
a function that return the value, for each linear predictor, that
makes the estimating equation Fisher consistent. If NULL
the default internal function is used.
a function that return the value, for each linear predictor,
corresponding to the first derivative of m.approx.
If NULL the default internal function is used.
At the moment it is not used.
A list with the following components:
a named vector of coefficients.
Initial vector of coefficients.
the family object used.
weighted Pearson residuals.
the fitted mean values, obtained by transforming the linear predictors by the inverse of the link function.
the linear fit on link scale.
the estimated asymptotic covariance matrix of the estimated coefficients.
logical. Was the IWLS algorithm judged to have converged?
the number of iterations used by the influence algorithm.
the tuning constant c in Tukey's bisquare psi-function.
how the weights on the design matrix x were evaluated.
weights used to down-weight observations based on the position of the observation in the design space.
robustness weights for each observations.
C. Agostinelli, M. Valdora and V.J Yohai (2018) Initial Robust Estimation in Generalized Linear Models with a Large Number of Covariates. Submitted.
M. Valdora and V.J. Yohai (2014) Robust estimators for generalized linear models. Journal of Statistical Planning and Inference, 146, 31-48.
# NOT RUN {
data(epilepsy)
Efit1 <- glm(Ysum ~ Age10 + Base4*Trt, family=poisson, data=epilepsy)
x <- model.matrix( ~ Age10 + Base4*Trt, data=epilepsy)
poissonMTsetwd(tempdir())
Efit2 <- glmrobMT(x=x, y=epilepsy$Ysum)
# }
Run the code above in your browser using DataLab