------------------------------------------------------------------------------- help forglmcorr-------------------------------------------------------------------------------

Correlation measure of predictive power and RMS error for GLMs

glmcorr[ ,jackknife]

Description

glmcorrcalculates the correlation between the response and the fitted or predicted response, its square, and the root mean square error afterglm.

RemarksZheng and Agresti (2000) discuss the correlation between the response and the fitted or predicted response as a general measure of predictive power for GLMs. This measure has the advantages of referring to the original scale of measurement, of being applicable to all types of GLM and of being familiar to many users of statistics. Preferably, it should be used as a comparative measure for different models applied to the same data set, given that restrictions on values of the response may imply limitations on its value (see e.g. Cox and Wermuth, 1992).

For an arbitrary GLM, this correlation is invariant under a location-scale transformation and it is the positive square root of the average proportion of variance explained by the predictors. However, again for an arbitrary GLM, it need not equal the positive square root of other definitions of R-square (e.g. Hardin and Hilbe, 2001); and it need not be monotone increasing in the complexity of the predictors, although in practice that is common. The correlation is necessarily sensitive to outliers.

As the predicted is a function of the observed, the correlation calculated from a sample may be expected to be biased upwards. A jackknifed correlation is provided as one alternative. Zheng and Agresti provide more discussion of this point, including other estimators and a bootstrap approach to providing confidence intervals for the correlation and to estimating the degree of overfitting.

The root mean square error is calculated as the square root of the sum of squares of (observed - fitted) divided by the residual degrees of freedom.

Options

jackknifespecifies that a jackknifed estimate of the correlation be provided.

Examples. glm

whatever. glmcorr

AuthorNicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

ReferencesCox, D.R. and N. Wermuth. 1992. A comment on the coefficient of determination for binary responses.

American Statistician46: 1-4.Hardin, J. and J. Hilbe. 2001.

Generalized linear models and extensions.College Station, TX: Stata Press.Zheng, B. and A. Agresti. 2000. Summarizing the predictive power of a generalized linear model.

Statistics in Medicine19: 1771-1781.

Saved results

r(rho)correlation between observed and predictedr(rsq)square of correlation between observed and predictedr(jrho)jackknifed correlation between observed and predicted (if requested)r(rmse)root mean square error

Also seeManual:

[R] glm,[R] jknifeOn-line: help for glm, jknife