The one-factor linear model is the simplest way to show a relationship between two variables: y and x. In other words, we try to use x to explain y. The general form for a one-factor linear model is given here, where yt is the dependent variable at time t, α is the intercept, β is the slope, xt is the value of an independent variable at time t, and εt is a random term:

To run a linear regression, we intend to estimate the intercept (α) and the slope (β). One-factor means that the model has just one explanatory variable, that is, one independent variable of x, and linear means that when drawing a graph based on the equation (1), we would have a straight line. With the following R program, we could get a linear line:
> x<--10:10
> y<-2+1.5*x
> title<-"A straight line"
> plot(x,y,type='l...