influence.ivreg {ivreg} | R Documentation |
Deletion and Other Diagnostic Methods for "ivreg"
Objects
Description
Methods for computing deletion and other regression diagnostics for 2SLS regression.
It's generally more efficient to compute the deletion diagnostics via the influence
method and then to extract the various specific diagnostics with the methods for
"influence.ivreg"
objects. Other diagnostics for linear models, such as
added-variable plots (avPlots
) and component-plus-residual
plots (crPlots
), also work, as do effect plots
(e.g., predictorEffects
) with residuals (see the examples below).
The pointwise confidence envelope for the qqPlot
method assumes an independent random sample
from the t distribution with degrees of freedom equal to the residual degrees of
freedom for the model and so are approximate, because the studentized residuals aren't
independent.
For additional information, see the vignette Diagnostics for 2SLS Regression.
Usage
## S3 method for class 'ivreg'
influence(
model,
sigma. = n <= 1000,
type = c("stage2", "both", "maximum"),
applyfun = NULL,
ncores = NULL,
...
)
## S3 method for class 'ivreg'
rstudent(model, ...)
## S3 method for class 'ivreg'
cooks.distance(model, ...)
## S3 method for class 'influence.ivreg'
dfbeta(model, ...)
## S3 method for class 'ivreg'
dfbeta(model, ...)
## S3 method for class 'ivreg'
hatvalues(model, type = c("stage2", "both", "maximum", "stage1"), ...)
## S3 method for class 'influence.ivreg'
rstudent(model, ...)
## S3 method for class 'influence.ivreg'
hatvalues(model, ...)
## S3 method for class 'influence.ivreg'
cooks.distance(model, ...)
## S3 method for class 'influence.ivreg'
qqPlot(
x,
ylab = paste("Studentized Residuals(", deparse(substitute(x)), ")", sep = ""),
distribution = c("t", "norm"),
...
)
## S3 method for class 'ivreg'
influencePlot(model, ...)
## S3 method for class 'influence.ivreg'
influencePlot(model, ...)
## S3 method for class 'ivreg'
infIndexPlot(model, ...)
## S3 method for class 'influence.ivreg'
infIndexPlot(model, ...)
## S3 method for class 'influence.ivreg'
model.matrix(object, ...)
## S3 method for class 'ivreg'
avPlots(model, terms, ...)
## S3 method for class 'ivreg'
avPlot(model, ...)
## S3 method for class 'ivreg'
mcPlots(model, terms, ...)
## S3 method for class 'ivreg'
mcPlot(model, ...)
## S3 method for class 'ivreg'
Boot(
object,
f = coef,
labels = names(f(object)),
R = 999,
method = "case",
ncores = 1,
...
)
## S3 method for class 'ivreg'
crPlots(model, terms, ...)
## S3 method for class 'ivreg'
crPlot(model, ...)
## S3 method for class 'ivreg'
ceresPlots(model, terms, ...)
## S3 method for class 'ivreg'
ceresPlot(model, ...)
## S3 method for class 'ivreg'
plot(x, ...)
## S3 method for class 'ivreg'
qqPlot(x, distribution = c("t", "norm"), ...)
## S3 method for class 'ivreg'
outlierTest(model, ...)
## S3 method for class 'ivreg'
spreadLevelPlot(x, main = "Spread-Level Plot", ...)
## S3 method for class 'ivreg'
ncvTest(model, ...)
## S3 method for class 'ivreg'
deviance(object, ...)
## S3 method for class 'rivreg'
influence(model, ...)
Arguments
model , x , object |
A |
sigma. |
If |
type |
If |
applyfun |
Optional loop replacement function that should work like
|
ncores |
Numeric, number of cores to be used in parallel computations. If set
to an integer the
|
... |
arguments to be passed down. |
ylab |
The vertical axis label. |
distribution |
|
terms |
Terms for which added-variable plots are to be constructed; the default,
if the argument isn't specified, is the |
f , labels , R |
see |
method |
only |
main |
Main title for the graph. |
Value
In the case of influence.ivreg
, an object of class "influence.ivreg"
with the following components:
coefficients
the estimated regression coefficients
model
the model matrix
dfbeta
influence on coefficients
sigma
deleted values of the residual standard deviation
dffits
overall influence on the regression coefficients
cookd
Cook's distances
hatvalues
hatvalues
rstudent
Studentized residuals
df.residual
residual degrees of freedom
In the case of other methods, such as rstudent.ivreg
or
rstudent.influence.ivreg
, the corresponding diagnostic statistics.
Many other methods (e.g., crPlot.ivreg
, avPlot.ivreg
, Effect.ivreg
)
draw graphs.
See Also
ivreg
, avPlots
,
crPlots
, predictorEffects
,
qqPlot
, influencePlot
,
infIndexPlot
, Boot
,
outlierTest
, spreadLevelPlot
,
ncvTest
.
Examples
kmenta.eq1 <- ivreg(Q ~ P + D | D + F + A, data = Kmenta)
summary(kmenta.eq1)
car::avPlots(kmenta.eq1)
car::mcPlots(kmenta.eq1)
car::crPlots(kmenta.eq1)
car::ceresPlots(kmenta.eq1)
car::influencePlot(kmenta.eq1)
car::influenceIndexPlot(kmenta.eq1)
car::qqPlot(kmenta.eq1)
car::spreadLevelPlot(kmenta.eq1)
plot(effects::predictorEffects(kmenta.eq1, residuals = TRUE))
set.seed <- 12321 # for reproducibility
confint(car::Boot(kmenta.eq1, R = 250)) # 250 reps for brevity
car::outlierTest(kmenta.eq1)
car::ncvTest(kmenta.eq1)