Plot points with the corresponding linear regression line
Plots points with the corresponding linear regression line
plot_reg(x, y, pch = 19, xlab = NULL, ylab = NULL, ...)
x
: numeric vectory
: numeric vectorpch
: type of pointsxlab
: character string, label of the x axis, NULL
by defaultylab
: character string, label of the y axis, NULL
by default...
: other arguments to be passed in plot
None
plot_reg(cgd$age, cgd$height, xlab="Age (years)", ylab="Height")
Hugo Varet
Useful links