Understanding Linear Regression and finding R-Squared

I don’t think the output you’re showing is produced by the inputs you’ve posted above. Both DBirths and DEmployment are just floating point numbers, but your output B: M suggests that you have a categorical variable where one of the levels is M.

As @Mattriks says above the R-squared of the model can be obtained by calling

julia> r2(ols)
0.0685632968228097

This is also explained in the docs here, which I recommend you read if you want to work with the GLM package.

Your question about the interpretation of the B: M coefficient suggest that it would also be helpful to consult introductory level statistics or econometrics textbooks. A popular one that I’ve used myself to teach first year undergrads is Wooldridge’s Introductory Econometrics.

1 Like