gam

Root mean square deviation on binned GAM results using R

Background A PostgreSQL database uses PL/R to call R functions. An R call to calculate Spearman's correlation looks as follows: cor( rank(x), rank(y) ) Also in R, a naïve calculation of a fitted generalized additive model (GAM): data.frame( x, fitted( gam( y ~ s(x) ) ) ) Here x represents the years from 1900 to 2009 and y is the a...