0

Click for image

How to remove the line at the bottom? (the regression formula) & How to remove the "cook distance" title?

cutoff=4/((nrow(forR_v3)-length(linear1$coefficients)-2))
plot(linear1,which=4,cook.levels=cutoff, title=" ", main=NULL, sub=NULL, 
axes=FALSE, ann=FALSE)
axis(1)
axis(2)
Richard Telford
  • 9,558
  • 6
  • 38
  • 51
Fifo
  • 1
  • 1
    When asking for help, you should include a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data that we can copy/paste into R to see what you are seeing. That will make it easier to help you. – MrFlick May 24 '17 at 14:55
  • That's just the `xlab=` of your plot, no? And `main=` for the title? [Doc](https://stat.ethz.ch/R-manual/R-devel/library/graphics/html/title.html) – patrick May 24 '17 at 15:16
  • Nope, xlab= "xxx" would appear on top of the regression formula. Main also does not change the name of the plot.. – Fifo May 25 '17 at 00:12

1 Answers1

1
fit <- lm(Petal.Length ~ Sepal.Length, iris)
plot(fit,which=4, caption="", sub.caption="", cook.levels=4/150, ann=FALSE, bty="n")

enter image description here

Adam Quek
  • 6,973
  • 1
  • 17
  • 23