Reputation: 85
When tried to use crPlot()
function in car
package, I had encountered this error:
m1 <- lm(socst ~ read+write, data=hsb2)
crPlot(m1)
Error in crPlot.lm(m1) : argument "variable" is missing, with no default
And the same error happens with avPlot()
.
Upvotes: 1
Views: 1279
Reputation: 7592
From the documentation:
S3 method for lm crPlot(model, variable, id=FALSE, order=1, line=TRUE, smooth=TRUE, col=carPalette()[1], col.lines=carPalette()[-1], xlab, ylab, pch=1, lwd=2, grid=TRUE, ...)
variable: A quoted string giving the name of a variable for the horizontal axis.
Also, you should generally use 'crPlots', not 'crPlot'.
Upvotes: 2