Description Usage Arguments Details Value Examples
Similar to a extended version of broom::
augment
for lm
and glm
objects but with prepared for the diagnostic plots.
1 2 |
x |
|
labels.id |
labels for all observations |
original data frame used to create lm or glm object
row number 1 to nrow(original data)
provides labels or strings with same names as
.index
weights from the model for each observation
predicted values in y
terms
(not probablities, logit probabilities, log transformed, etc), as such,
for glm this is different then fitted(x)
residuals between .yhat
and y
leverage for each observation, corresponds to the diagonal of the "hat" matrix (diag(X(X^TX)^{-1}X).
Cook's Distance, if lm
, then we use the estimated
standard deviation to calculate the value. Cook's Distance is the a
"leave-one-out" based diagnostic for linear and generalized linear models
discussed in Belsley, Kuh and Welsch (1980), Cook and Weisberg (1982), etc
residuals weighted by the .weights
, (i.e.
√{ .weights } \cdot .resid)
the standardized residuals using weighted.residuals and scaled by leverage and the estimated standard deviation, (i.e. \frac{\code{.weighted.resid}}{std.deviation * (1 - \code{.leverage})} )
the square-root of the absolute value of the standardized residuals
pearson residuals, residuals divided by the square root the variance
standardized pearson residuals, (i.e. \frac{\code{.pearson.resid}}{std.deviation * (1- \code{.leverage})})
logit of the leverage (i.e. log(\frac{x}{1-x}))
Index ordering of residuals (in absolute value)
Index ordering of standardized residuals (in absolute value)
Index ordering of cook's distance
logical vector if leverage != 1 (for extreme cases)
augmented data.frame, see details
for more information
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.