Last chance! 50% off unlimited learning
Sale ends in
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()
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.
A numeric vector containing explanatory data.
A numeric vector containing response data.
Parameter to be estimated. Either "slope"
or "intercept"
.
The number of parameter estimates to be depicted. The true LS estimate will always be in the center of this sequence.
Speed of animation (in frames per second). A smaller interval decreases speed. May not work in all systems; see Sys.sleep
.
Line color.
Additional arguments to plot
Ken Aho
loglik.plot
, anm.ls
if (FALSE) {
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")}
Run the code above in your browser using DataLab