Skip to main content
deleted 1 character in body
Source Link
Nick Cox
  • 59.5k
  • 8
  • 136
  • 212

Your problem is the algorithm by which you're calculating the coefficients and the variance-covariance matrix.

While it's (usually) algebraically fine, it's not numerically stable.

You will need to use a reasonably stable algorithm to do the calculations -- theythe way you're doing it really can be very inaccurate; it's quite possible for some values to be close, and for others to be nowhere near the correct least squares solution.

A common choice in a lot of regression routines is via QR decomposition of the X matrix; other choices make more sense in particular circumstances.

Your problem is the algorithm by which you're calculating the coefficients and the variance-covariance matrix.

While it's (usually) algebraically fine, it's not numerically stable.

You will need to use a reasonably stable algorithm to do the calculations -- they way you're doing it really can be very inaccurate; it's quite possible for some values to be close, and for others to be nowhere near the correct least squares solution.

A common choice in a lot of regression routines is via QR decomposition of the X matrix; other choices make more sense in particular circumstances.

Your problem is the algorithm by which you're calculating the coefficients and the variance-covariance matrix.

While it's (usually) algebraically fine, it's not numerically stable.

You will need to use a reasonably stable algorithm to do the calculations -- the way you're doing it really can be very inaccurate; it's quite possible for some values to be close, and for others to be nowhere near the correct least squares solution.

A common choice in a lot of regression routines is via QR decomposition of the X matrix; other choices make more sense in particular circumstances.

added 163 characters in body
Source Link
Glen_b
  • 290.5k
  • 37
  • 652
  • 1.1k

Your problem is the algorithm by which you're calculating the coefficients and the variance-covariance matrix.

While it's (usually) algebraically fine, it's not numerically stable.

You will need to use a reasonably stable algorithm to do the calculations -- they way you're doing it really can be very inaccurate; it's quite possible for some values to be close, and for others to be nowhere near the correct least squares solution.

A common choice in a lot of regression routines is via QR decomposition of the X matrix; other choices make more sense in particular circumstances.

Your problem is the algorithm by which you're calculating the coefficients and the variance-covariance matrix.

While it's (usually) algebraically fine, it's not numerically stable.

You will need to use a reasonably stable algorithm to do the calculations.

A common choice in a lot of regression routines is via QR decomposition of the X matrix; other choices make more sense in particular circumstances.

Your problem is the algorithm by which you're calculating the coefficients and the variance-covariance matrix.

While it's (usually) algebraically fine, it's not numerically stable.

You will need to use a reasonably stable algorithm to do the calculations -- they way you're doing it really can be very inaccurate; it's quite possible for some values to be close, and for others to be nowhere near the correct least squares solution.

A common choice in a lot of regression routines is via QR decomposition of the X matrix; other choices make more sense in particular circumstances.

Source Link
Glen_b
  • 290.5k
  • 37
  • 652
  • 1.1k

Your problem is the algorithm by which you're calculating the coefficients and the variance-covariance matrix.

While it's (usually) algebraically fine, it's not numerically stable.

You will need to use a reasonably stable algorithm to do the calculations.

A common choice in a lot of regression routines is via QR decomposition of the X matrix; other choices make more sense in particular circumstances.