sdm package gam model smoothing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

sdm package gam model smoothing

Kelly McCaffrey
Hello everyone,
I'm working on some species distribution models using the package 'sdm' to
perform the multiple-model k-fold cross validation. But, upon viewing the
results, I'm concerned that smoothing parameters are not being applied to
the gam model formula. Unfortunately, I'm not able to provide you with the
example data, but here's the piece of code I'm working with:

data<-sdmData(pa~SBT+Chla+PAR+Kd+Wave+Depth,train=new_sdmdata)
model1<-sdm(pa~SBT+Chla+PAR+Kd+Wave+Depth, data=data,
family=gaussian(link="logit"),
            methods=c("glm", "gam"),
            replication="sub", test.percent=25, n=5)
getModelInfo(model1)
model1
##This code functions, but does not seem to apply smoothing parameters to
the gam model

model1<-sdm(pa~s(SBT)+s(Chla)+s(PAR)+s(Kd)+s(Wave)+s(Depth), data=data,
            family=gaussian(link="logit"), methods=c("glm", "gam"),
            replication="sub", test.percent=25, n=5)
getModelInfo(model1)
model1
##This piece of code returns: Error in u[[i]] <- list() :
 ## attempt to select less than one element in OneIndex

Does anyone know of the proper way to specify that smoothing parameters be
applied to gam models?
Thank you!
Kelly McCaffrey

--

*Kelly McCaffrey*
Graduate Student
Department of Biological Sciences
Florida Institute of Technology
150 W. University Blvd.
Melbourne, FL, 32901

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo