Solved
Contributor
Posts: 65

How to calculate pseudo R-Squared in proc GAM?

Hi folks;

I've run gam procedure to a data set and got the following output table. I wonder how I can calculate a pseudo R-Squared with the help of deviance.

Number of Observations 49988 12 Gaussian Identity

 Final Number of Backfitting Iterations 4 1.66181e-09 240769

 The backfitting algorithm converged.

Thanks!

Issac

Accepted Solutions
Solution
‎11-29-2012 02:25 PM
SAS Employee
Posts: 6

Re: How to calculate pseudo R-Squared in proc GAM?

One possibility is discussed in Cameron and Trevedi's "Regression Analysis of Count Data" which describes the deviance as the GLM generalization of the sum of squares. They refer to two papers by Cameron and Windmeijer where a pseudo-R-squared is proposed based on a decomposition of the deviance. In essence, the proposal is to use R2 = 1-(D(intercept-only-model)/D(full-model)). I would recommend reviewing the original papers to verify that the interpretation is appropriate for your particular model before using the result.

All Replies
Solution
‎11-29-2012 02:25 PM
SAS Employee
Posts: 6

Re: How to calculate pseudo R-Squared in proc GAM?

One possibility is discussed in Cameron and Trevedi's "Regression Analysis of Count Data" which describes the deviance as the GLM generalization of the sum of squares. They refer to two papers by Cameron and Windmeijer where a pseudo-R-squared is proposed based on a decomposition of the deviance. In essence, the proposal is to use R2 = 1-(D(intercept-only-model)/D(full-model)). I would recommend reviewing the original papers to verify that the interpretation is appropriate for your particular model before using the result.

🔒 This topic is solved and locked.