Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: graphic
See also: grsurface grlinreg grcontour2

Quantlet: grlinreg2
Description: generates a graphical object which contains a linear regression plane from the data. The plane is computed on a rectangular grid with n^2 meshes.

Link:
Usage: gl = grlinreg2 (x, {n, {col}})
Input:
x m x 3 matrix
n 2 x 1 matrix
col color
Output:
gl composed graphical object

Example:
library("graphic")
x  = normal(100,2)
y  = 3*x[,1]+5*x[,2]+normal(100)
l  = grlinreg2(x~y)
d  = createdisplay(1,1)
show(d,1,1,x~y,l)

Result:
shows the data and the linear regression plane



Author: S. Klinke, 19961005
(C) MD*TECH Method and Data Technologies, 05.02.2006