Error trying to plot an ols object in R

I'm currently having issues trying to plot a linear regression done with ols() in R.

My code is:

library(languageR)
library(rms)

english.dd = datadist(english)

options(datadist = "english.dd")

english.ols = ols(RTlexdec  ~ WrittenFrequency + LengthInLetters, english)

plot(english.ols)

## Error en match.arg(type) : 
##   'arg' should be one of “ordinary”, “score”, “dfbeta”, “dfbetas”, “dffit”,  “dffits”, “hat”, “hscore”

## Calls: plot ... weighted.residuals -> residuals -> residuals.ols -> match.arg

I don't know how to resolve the problem, I've been looking for solutions online but I couldn't find any.

Thanks for your help.

Upvotes: 2

Views: 790

Answers (1)

Seth
Seth

Reputation: 4795

When I run

plot(Predict(english.ols))

I get: enter image description here

There are many other examples in ?plot.Predict

Upvotes: 1

Related Questions