| Library: | graphic |
| See also: | grxline gryline grlinreg2 |
| Macro: | grlinreg | |
| Description: | Generates a graphical object which contains a linear regression line from the data. |
| Usage: | gl = grlinreg (x {, col}) | |
| Input: | ||
| x | n x 2 matrix | |
| col | color | |
| Output: | ||
| gl | composed graphical object | |
library ("graphic")
x = normal(100)
y = 3*x+normal(100)
l = grlinreg(x~y)
d = createdisplay(1,1)
show(d,1,1,x~y,l)
shows the data and the linear regression line
| Library: | graphic |
| See also: | grxline gryline grlinreg2 |