Function to compute R^2 value for Generalized Linear Model in Julia

Viewed 53

I have a dataset df and I need to calculate it's glm summary.

I got everything working properly using

jlm=glm(@formula(y~x1+x2),df,Normal())

This gets me the Beta Values and Standard-Error, but I need to find the R2 value too, if jlm was an lm model using r2(jlm) would've worked fine, but in the Generalized Linear Model, GLM shows there no method r2 for glm.

Is there a way to calculate R2 for glm?

0 Answers
Related