| GLM influence measures | R Documentation |
These functions compute common (leave-one-out) diagnostics for the models in
a bg_GLM object.
## S3 method for class 'bg_GLM'
rstandard(model, type = c("sd.1", "predictive"), ...)
## S3 method for class 'bg_GLM'
rstudent(model, ...)
## S3 method for class 'bg_GLM'
hatvalues(model, ...)
## S3 method for class 'bg_GLM'
cooks.distance(model, ...)
dffits.bg_GLM(model)
## S3 method for class 'bg_GLM'
dfbeta(model, ...)
## S3 method for class 'bg_GLM'
dfbetas(model, ...)
covratio.bg_GLM(model)
## S3 method for class 'bg_GLM'
influence(model, do.coef = TRUE, region = NULL, ...)
model |
A |
type |
The type of standardized residuals. Default: |
... |
Unused |
do.coef |
Logical indicating whether to calculate |
region |
Character string of the region(s) to return results for. Default is to calculate for all regions |
The influence method calculates all diagnostics present in
lm.influence and
influence.measures, consisting of the following
functions:
Standardized residuals. Choosing type='predictive'
returns leave-one-out cross validation residuals. The “PRESS”
statistic can be calculated as colSums(resids.p^2)
Studentized residuals
The leverage, or the diagonal of the hat/projection matrix
Cook's distance
The change in fitted values when deleting observations
The change in parameter estimates (coefficients) when deleting observations
The scaled change in parameter estimates
The covariance ratios, or the change in the determinant of the covariance matrix of parameter estimates when deleting observations
Most influence functions return a numeric matrix in which rownames
are Study ID's and column names are regions. dfbeta and
dfbetas return a numeric array in which each column is a parameter
estimate and the 3rd dimension is for each region. influence returns
a list with class infl.bg_GLM and elements:
infmat |
Numeric array (like |
is.inf |
Logical array of the same data as |
f |
The model formula |
sigma |
The leave-one-out residual standard deviation |
wt.res |
Model residuals |
Each variable has a different criterion for determining outliers. In the
following: x is the influence variable (for DFBETA, the
criterion applies to all DFBETAs); k is the number of columns of the
design matrix; dfR is the residual degrees of freedom; and n is
the number of observations.
If |x| > 1
If |x| > 3 \sqrt{k / dfR}
If |1 - x| > (3k / dfR)
If F_{k, dfR}(x) > 0.5
If x > 3k / n
The return object of influence has a print method which will
list the subjects/variables/regions for which an outlier was detected.
Christopher G. Watson, cgwatson@bu.edu
GLM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.