How can I remove a lm() formula of my model, which is by default being added to my plot(mod) function?
Asked
Active
Viewed 536 times
-1
-
1Hello and welcome to StackOverflow. Please take some time to read the help page, especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). And more importantly, please read [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal Reproducible Examples](http://stackoverflow.com/help/mcve). – Abhishek Bhagate Jun 13 '20 at 20:21
-
In addition to @Abhishek 's recommendations, I'd add that you should look at [How to make a great R reproducible example](https://stackoverflow.com/q/5963269/8386140). In particular, it's hard for others to help you without access to the code or data you used when encountering your problem. You can [edit] your question to include the code that produced the plot, as well as the output of the R command `dput(your_data)`, where you replace `your_data` with the name of your dataset, so that we can also use your data in our R sessions. If `your_data` is large, you can use `dput(head(your_data))`. – duckmayr Jun 13 '20 at 20:26
-
Thanks, but it was simply `plot(mod)` call, standard formula for plotting residuals in lm model. :) Usually by default it didn't produce any captions, but now, somehow by default it does. – huberttt Jun 13 '20 at 20:33
1 Answers
2
Yes, just add the sub.caption
argument.
plot(mod, sub.caption=" ")

G5W
- 36,531
- 10
- 47
- 80
-
1You can even leave the space like this: `plot(mod, sub.caption="")`. For more customizations see documentation: [Plot Diagnostics for an lm Object](https://stat.ethz.ch/R-manual/R-devel/library/stats/html/plot.lm.html). – Jun 13 '20 at 20:32