| Library: | tware |
| See also: | twrandomsample twpvalue twnormalize tw1d twpearson twclt |
| Macro: | twlinreg | |
| Description: | teachware quantlet twlinreg gives visual insight into how least squares simple linear regression works, and the relationship between the regression of Y on X, X on Y, and total regression. |
| Usage: | twlinreg({x}) | |
| Input: | ||
| x | matrix (n x 2) with user defined data | |
The parameter x is optional. If it is not given, the user is asked to define the desired correlation interactively.
; load teachware library
library("tware")
; predefine matrix
x = normal(100,2)
; call twlinreg teachware quantlet
twlinreg(x)
a three window port display with the scatterplot of the matrix x in the upper port and the values of the RSS and the regression equation in the middle (text) port. The lower port is reserved for display of the current residuals.
| Library: | tware |
| See also: | twrandomsample twpvalue twnormalize tw1d twpearson twclt |