今天也遇到了这个问题,看文档后发现使用方法变了。
Usage
influencePlot(model, ...)
## S3 method for class 'lm'
influencePlot(model, scale=10,
xlab="Hat-Values", ylab="Studentized Residuals", id=TRUE, ...)
Arguments
model
a linear or generalized-linear model.
scale
a factor to adjust the size of the circles.
xlab, ylab
axis labels.
id
settings for labelling points; see link{showLabels} for details. To omit point labelling, set id=FALSE; the default, id=TRUE is equivalent to id=list(method="noteworthy", n=2, cex=1, col=carPalette()[1], location="lr"). The default method="noteworthy" is used only in this function and indicates setting labels for points with large Studentized residuals, hat-values or Cook's distances. Set id=list(method="identify") for interactive point identification.
...
arguments to pass to the plot and points functions.
所以现在调用,可以采用这种方式,如:
influencePlot(fit, id=list(method="identify"), main="Influence Plot", sub="Circle size is proportional to Cook's distance")