search for: amgam

Displaying 1 result from an estimated 1 matches for "amgam".

2011 Nov 08
3
GAM
...R community! I am analyzing the data set "motorins" in the package "faraway" by using the generalized additive model. it shows the following error. Can some one suggest me the right way? library(faraway) data(motorins) motori <- motorins[motorins$Zone==1,] library(mgcv) >amgam <- gam(log(Payment) ~ offset(log(Insured))+ s(as.numeric(Kilometres)) + s(Bonus) + Make + s(Claims),family = gaussian, data = motori) Error in smooth.construct.tp.smooth. spec(object, dk$data, dk$knots) : A term has fewer unique covariate combinations than specified maximum degrees of freedom...