How to extract the model matrix from a Julia GLM object -
i'm playing around linear regression in julia using glm package. interested in getting model matrix out lm object can calculate leverage values (diagonals of hat matrix), can't find function this. equivalent in r model.matrix
.
i guess regression manually via matrix multiplication, didn't want reinvent wheel.
just figured out, calling names(ols)
on lm object (which calling ols
). model matrix can extracted ols.mm
.
julia-lang
No comments:
Post a Comment