powered by
The function generates the scatter plot with the regression equation.
regplot(data, xlab="Explanatory Variable", ylab="Response Variable", position=6, mean=TRUE, digits=4)
data is a data.frame
the first column contain the explanatory variable
the others columns contain the responses variables
name of variable x
name of variable y
position of equation in the graph
top=1
bottomright=2
bottom=3
bottomleft=4
left=5
topleft=6 (default)
topright=7
right=8
center=9
TRUE = scatter plots with averages (default)
FALSE = scatter plots with all data
number of digits
lm, lme, ea1(easyanova package), pr2, pr2, dplot(ds package)
# NOT RUN { # data data(data5) d1=data5[,c(1,2)] regplot(d1, position=8) d2=data5[,c(1,3)] regplot(d2, position=8) d3=data5[,c(1,4)] regplot(d3, position=8) # }
Run the code above in your browser using DataLab