So, I have a homework assignment in which I'm being asked to compare the fit of two similar models by comparing their $R^2$ and AIC. Both models were run in R, one using the lm
command (for OLS) and the other the glm
command; the former yielded an adjusted $R^2$ of 0.82, and the second model, with the same DV and covariates, produced an AIC of 365.96.
The only difference between the models is the "g" in the lm
/glm
command. The coefficients and standard errors they returned are virtually identical.
How does one compare $R^2$ and AIC? How can I tell which regression model fits the data better?