anm.ls.reg | R Documentation |
Depicts the process of least squares estimation of simple linear regression parameters by plotting the least squares function with respect to estimate possibilities for the intercept or slope.
anm.ls.reg(X, Y, parameter="slope", nmax=50, interval = 0.1, col = "red",...)
anm.ls.reg.tck()
X |
A numeric vector containing explanatory data. |
Y |
A numeric vector containing response data. |
parameter |
Parameter to be estimated. Either |
nmax |
The number of parameter estimates to be depicted. The true LS estimate will always be in the center of this sequence. |
interval |
Speed of animation (in frames per second). A smaller interval decreases speed. May not work in all systems; see |
col |
Line color. |
... |
Additional arguments to |
An animated plot of the plot possible regression lines is created along with an animated plot of the residual sum of squares. The function anm.ls.reg.tck
provides a GUI to run the function.
Ken Aho
loglik.plot
, anm.ls
## Not run:
X<-c(11.2,10.8,9.0,12.4,12.1,10.3,10.4,10.6,9.3,11.8)
Y<-log(X)
anm.ls.reg(X, Y, parameter = "slope")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.