Learn R Programming

robcbi (version 1.1-4)

cubinf: Conditionally unbiased bounded influence estimates of discrete Generalized Linear Models

Description

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".

Usage

cubinf(x, y, weights = NULL,  start=NULL, etastart=NULL, mustart=NULL,
       offset = NULL, family = binomial(), control = cubinf.control(...),  
       intercept = FALSE, ...)

Value

A list with the following components:

coefficients

Coefficient estimates.

residuals

Working residuals.

rsdev

Deviance residuals.

fitted.values

Fitted values.

cov

Estimated covariance matrix of the coefficients.

rank

Rank of the model matrix.

df.residuals

Degrees of freedom in the residuals.

ci

Vector of final bias corrections.

A

Final value of the matrix A.

ai

Vector with components a_i=ufact/|Ax_i| (where x_i^T denotes the ith row of the model matrix)

converged

A logical value. FALSE if the maximum number of iterations was reached.

control

Control parameters.

prior.weights

Input vector w (when some of its components are different from 1).

family

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.

linear.predictors

Components of the linear predictor (the model matrix multiplied by the coefficient vector).

iter

Number of iterations required in the main algorithm.

y

Coded value of the response.

gradient

Vector of the final unscaled negative gradient of the objective function.

inv.hessian

Vector of the final inverse of the Hessian matrix in compact storage mode.

Arguments

x

Vector or matrix of explanatory variable(s). Columns represent variables and rows are observations.

y

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.

weights

Optional weigths for weighted regression. Components must be non negative integers.

start

Starting values for the parameters in the linear predictor. Not used but required for compatibility with the glm function.

etastart

Starting values for the linear predictor. Not used but required for compatibility with the glm function.

mustart

Starting values for the vector of means. Not used but required for compatibility with the glm function.

offset

Optional offset added to the linear predictor.

family

A family object. Only two options are available for cubinf: 'family=binomial()' and 'family=poisson()'.

control

A list of control parameters for the numerical algorithms. See cubinf.control for the possible control parameters and their defaults.

intercept

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.

Details

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.

References

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.

See Also

glm(..., method="cubinf"), cubinf.control

Examples

Run this code
  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