Dear all, Following the help from gam(mgcv) help page, i tried to analyze my dataset with all the default arguments. Unfortunately, it can't be run successfully. I list the errors below.
#m.gam<-gam(mark~s(x,y)+s(lstday2004)+s(slope)+s(ndvi2004)+s(elevation)+s(disbinary),family=binomial(logit),data=point) m.gam<-gam(mark~s(x,y,k=10)+s(lstday2004,k=10)+s(slope,k=10)+s(ndvi2004,k=10)+s(elevation,k=10)+s(disbinary,k=10),family=binomial(logit),data=point) > m.gam<-gam(mark~s(x.1,y.1,k=10)+s(lstday2004,k=10)+s(slope,k=10)+s(ndvi2004,k=10)+s(elevation,k=10)+s(disbinary,k=10),family=binomial(logit),data=point) #?????? Errors: smooth.construct.tp.smooth.spec(object, data, knots) : A term has fewer unique covariate combinations than specified maximum degrees of freedom. #========================# Descriptions for my dataset #========================# There are 1 response variable "mark" (1-case,0-control), and 7 explanatory covariables. x/y are spatial coordinates, lstday2004, slope, ndvi2004, elevation: continuous variables; disbinary : binary variable. Is there any problems with the above codes? How should i solve it? Any help or suggestions are greatly appreciated. -- With Kind Regards, oooO::::::::: (..)::::::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/:::: ::::::::::::: [***********************************************************************] Zhi Jie,Zhang ,PHD Tel:+86-21-54237149 Dept. of Epidemiology,School of Public Health,Fudan University Address:No. 138 Yi Xue Yuan Road,Shanghai,China Postcode:200032 Email:[EMAIL PROTECTED] Website: www.statABC.com <http://www.statabc.com/> [***********************************************************************] oooO::::::::: (..)::::::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/:::: ::::::::::::: [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.