Adding r, R^2, RMSE and regression equation in plot

I want to make a plot where the r, RMSE, p-value, and regression equation will be shown. I have a data set (x,y). Can anyone please, tell me the code for that?

If you use ggplot2 for plotting, you can use stat_poly_eq() from the ggpmisc package for that, or stat_regline_equation from ggpubr.

You can also do the regression before plotting, and simply annotate the plot with e.g. geom_text().

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.