glmrobMT: Robust Fitting of Poisson Generalized Linear Models using MT...

Description Usage Arguments Value Author(s) References See Also Examples

Description

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.

Usage

1
2
3
4
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, ...)

Arguments

x

design matrix of dimension n * p.

y

vector of observations of length n.

weights

an optional vector of weights to be used in the fitting process (in addition to the robustness weights computed in the fitting process).

start

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.

offset

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.

family

a description of the error distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. See family for details of family functions. At the moment only poisson is available.

weights.on.x

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 √{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.

control

a list of parameters for controlling the fitting process. See the documentation for glmrobMT.control for details.

intercept

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.

trace.lev

logical (or integer) indicating if intermediate results should be printed; defaults to 0 (the same as FALSE).

include.cubinf

logical, if TRUE the cubinf is also used as possibile starting value.

m.approx

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.

mprime.approx

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.

Value

A list with the following components:

coefficients

a named vector of coefficients.

initial

Initial vector of coefficients.

family

the family object used.

residuals

weighted Pearson residuals.

fitted.values

the fitted mean values, obtained by transforming the linear predictors by the inverse of the link function.

linear.predictors

the linear fit on link scale.

cov

the estimated asymptotic covariance matrix of the estimated coefficients.

converged

logical. Was the IWLS algorithm judged to have converged?

iter

the number of iterations used by the influence algorithm.

cw

the tuning constant c in Tukey's bisquare psi-function.

weights.on.x

how the weights on the design matrix x were evaluated.

w.x

weights used to down-weight observations based on the position of the observation in the design space.

w.r

robustness weights for each observations.

Author(s)

Claudio Agostinelli, Marina Valdora and Victor J. Yohai

References

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.

See Also

poissonMT, glmrob and cubinf

Examples

1
2
3
4
5
6
  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) 

poissonMT documentation built on May 2, 2019, 11:01 a.m.