Conditionally unbiased bounded influence estimates as described in Kuensch et al. (1989) in three special GLM cases: Bernoulli, Binomial, and Poisson distributed responses. The result is an object of class "cubinf".
cubinf(x, y, weights = NULL, start=NULL, etastart=NULL, mustart=NULL,
offset = NULL, family = binomial(), control = cubinf.control(...),
intercept = FALSE, ...)
Vector or matrix of explanatory variable(s). Columns represent variables and rows are observations.
Vector of observed responses. In the case of Binomial responses, y is a two column matrix: the 1st column contains the number of successes, the 2nd column the number of failures. The Bernoulli case, is treated as a special Binomial case. However, the response y is a categorical variable (not a matrix with two colums) with two levels.
Optional weigths for weighted regression. Components must be non negative integers.
Starting values for the parameters in the linear predictor. Not used but required for compatibility with the glm function.
Starting values for the linear predictor. Not used but required for compatibility with the glm function.
Starting values for the vector of means. Not used but required for compatibility with the glm function.
Optional offset added to the linear predictor.
A family object. Only two options are available for cubinf: 'family=binomial()' and 'family=poisson()'.
A list of control parameters for the numerical algorithms. See cubinf.control for the possible control parameters and their defaults.
Logical flag: if TRUE, an intercept term is added to the model.
Further named control arguments as singular.ok or qr.out used in the case where the x matrix is singular.
A list with the following components:
Coefficient estimates.
Working residuals.
Deviance residuals.
Fitted values.
Estimated covariance matrix of the coefficients.
Rank of the model matrix.
Degrees of freedom in the residuals.
Vector of final bias corrections.
Final value of the matrix A.
Vector with components a_i=ufact/|Ax_i| (where x_i^T denotes the ith row of the model matrix)
A logical value. FALSE if the maximum number of iterations was reached.
Control parameters.
Input vector w (when some of its components are different from 1).
The family object used in the call to cubinf 'ics=1' for the Bernoulli case. 'ics=2' for the Binomial case. 'ics=3' for the Poisson case.
Components of the linear predictor (the model matrix multiplied by the coefficient vector).
Number of iterations required in the main algorithm.
Coded value of the response.
Vector of the final unscaled negative gradient of the objective function.
Vector of the final inverse of the Hessian matrix in compact storage mode.
The initial values of the coefficients (theta), the matrix A and the bias correction c are computed using the ROBETH subroutine GINTAC (Marazzi, 1993). Then an initial covariance matrix (for the convergence criterion) is computed by means of the ROBETH subroutines GFEDCA and KTASKW. Finally, the main algorithm (subroutine GYMAIN) alternates between improving values of - theta, for fixed A and c (theta-step, subroutine GYTSTP), - c, for fixed theta and A (c-step, subroutine GYCSTP), - A, for fixed theta and c (A-step, subroutine GYASTP).
For the different available options see the function cubinf.control.
Kuensch, H.R., Stefanski L.A., Carroll R.J. (1989). Conditionally unbiased bounded-influence estimation in general regression models, with application to generalized linear models. Journal of the American Statistical Association, 84, 460-466.
Marazzi, A. (1993). Algorithms, Routines, and S-functions for robust Statistics. Chapman and Hall, New York.
glm(..., method="cubinf"), cubinf.control
# NOT RUN {
library(robcbi)
y <- c(5,10,15,20,30,40,60,80,100)
x <- matrix(
c(0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1),
nrow=9,byrow=FALSE)
z <- cubinf(x,y, family=poisson, control=list(ufact=3.2), intercept=TRUE)
z$iter
z$coeff
z <- cubinf(x,y, family=poisson, control=list(ufact=30), intercept=TRUE)
z$iter
z$coeff
# }
Run the code above in your browser using DataLab