Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/regressionmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function modelmatrix end
Return `X'X` where `X` is the model matrix of `model`.
This function will return a pre-computed matrix stored in `model` if possible.
"""
crossmodelmatrix(model::RegressionModel) = (x = modelmatrix(model); Symmetric(x' * x))
crossmodelmatrix(model::RegressionModel; kwarg...) = (x = modelmatrix(model; kwarg...); Symmetric(x' * x))

"""
leverage(model::RegressionModel)
Expand Down
10 changes: 10 additions & 0 deletions src/statisticalmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,13 @@ function adjr2(model::StatisticalModel, variant::Symbol)
end

const adjr² = adjr2

"""
momentmatrix(model::StatisticalModel)

Return the matrix containing the estimating equation.

For linear regression models, the moment matrix is given by u*X, where u is the vector of residuals and X is the model matrix.

"""
function momentmatrix end