Extend Regression module to address first point in issue #67 #113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I extended
olsRegress
to the following settings with normally distributed errors(1) homoskedastic errors, known variance
(2) homoskedastic errors, unknown variance
(3) heteroskedastic errors, known variance
(4) heteroskedastic errors, unknown variance
In case (4) will still assume that we known the diagonal matrix$W$ in the error covariance $var(\epsilon) = \sigma^2W$ but not $\sigma^2$ . Case (4) addresses the first point specifically. The other cases are equally (or more) important from a statisticians point of view. In each case, standard errors for regression coefficients and overall model fit test statistics are computed along with their corresponding reference distributions.
I also provide example usage and implementation of Cholesky decomposition to use when extending the Regression module to eventually deal with regression error with arbitrary linear correlation structure (known as generalized least squares). This algorithm will also be useful if, in the future, one wanted to implement a version of R's
glm
.