The Least Squares Projection

The black directed line segments represent the two explanatory variable vectors in the matrix x. The blue directed line segment is the dependent variable vector. The red directed line segment is the least squares fitted dependent variable, usually referred to as "y hat". The orange vector is the least squares error vector. The squared length of the vector is given by the number RSS. You can control the purple vector, which lies in the plane spanned by the independent variables, by choosing values for myBeta. Your goal is to try to pick myBeta so that RSSmine is smaller than the RSS for least squares.

  No support for LM Objects