Influence plots | R Documentation |
Two different plot types that visualize p-value influencers.
1. inflPlot
: plots the linear regression, marks the reverser(s) in darkred and displays trend lines for the full and leave-reversers-out data set (black and darkred, respectively).
2. pvalPlot
: plots the p-values for each leave-one-out data point and displays the (log) p-values as an index plot with reverser points in darkred, together with the \alpha
-border as defined in lmInfl
and the original models' p-value.
inflPlot(infl, measure, ...)
pvalPlot(infl, ...)
infl |
an object obtained from |
measure |
which influence measure to use, see 'Details'. |
... |
other plotting parameters. |
The influence measure
's to use are those listed in lmInfl
, with the following syntax:
"dfb.Slope", "dffit", "cov.r", "cook.d", "hat", "sR", "hadi", "cdr", "Si"
.
The corresponding plot.
Andrej-Nikolai Spiess
Regression diagnostics: Identifying influential data and sources of collinearity.
Belsley DA, Kuh E, Welsch RE.
John Wiley, New York (2004).
Applied Regression Analysis: A Research Tool.
Rawlings JO, Pantula SG, Dickey DA.
Springer; 2nd Corrected ed. 1998. Corr. 2nd printing 2001.
Applied Regression Analysis and Generalized Linear Models.
Fox J.
SAGE Publishing, 3rd ed, 2016.
Residuals and Influence in Regression.
Cook RD & Weisberg S.
Chapman & Hall, 1st ed, New York, USA (1982).
set.seed(123)
a <- 1:20
b <- 5 + 0.08 * a + rnorm(20, 0, 1)
LM1 <- lm(b ~ a)
res1 <- lmInfl(LM1)
inflPlot(res1)
pvalPlot(res1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.