Learn R Programming

sampleSelection (version 1.2-12)

residuals.probit: Residuals of probit models

Description

Calculate residuals of probit models.

Usage

# S3 method for probit
residuals( object, type = "deviance", ... )

Arguments

object

an object of class probit.

type

the type of residuals which should be returned. The alternatives are: "deviance" (default), "pearson", and "response" (see details).

further arguments (currently ignored).

Value

A numeric vector of the residuals.

Details

The residuals are calculated with following formulas:

Response residuals: \(r_i = y_i - \hat{y}_i\)

Pearson residuals: \(r_i = ( y_i - \hat{y}_i ) / \sqrt{ \hat{y}_i ( 1 - \hat{y}_i ) }\)

Deviance residuals: \(r_i = \sqrt{ -2 \log( \hat{y}_i ) }\) if \(y_i = 1\), \(r_i = - \sqrt{ -2 \log( 1 - \hat{y}_i ) }\) if \(y_i = 0\)

Here, \(r_i\) is the \(i\)th residual, \(y_i\) is the \(i\)th response, \(\hat{y}_i = \Phi( x_i' \hat{\beta} )\) is the estimated probability that \(y_i\) is one, \(\Phi\) is the cumulative distribution function of the standard normal distribution, \(x_i\) is the vector of regressors of the \(i\)th observation, and \(\hat{\beta}\) is the vector of estimated coefficients.

More details are available in Davison & Snell (1991).

References

Davison, A. C. and Snell, E. J. (1991) Residuals and diagnostics. In: Statistical Theory and Modelling. In Honour of Sir David Cox, edited by Hinkley, D. V., Reid, N. and Snell, E. J., Chapman & Hall, London.

See Also

probit, residuals, residuals.glm, and probit-methods.