I really want to know how to calculate the predicted valued when I use gam.predict . my model is: newSO2 ~ s(pressure, bs = "cr") + s(maxtemp, bs = "cr") + mintemp + RH + solar + s(windspeed, bs = "cr") + s(transport, bs = "cr") > my new dataset is : pressure: -7.056847826 maxtemp: 2.737507877 mintemp: 3.51959342 RH: 8.772944565 Solar:0.200563855 Windspeed: -6.319313706 Transport:-380.5588726
the coefficient of formula is: > coef(so2e) (Intercept) mintemp RH solar s(pressure).1 s(pressure).2 s(pressure).3 s(pressure).4 s(pressure).5 s(pressure).6 s(pressure).7 s(pressure).8 s(pressure).9 s(maxtemp).1 s(maxtemp).2 0.91148590 0.20798857 0.15072713 0.17296204 0.46080941 0.23503683 0.09166914 0.06353043 -0.83130850 -1.36714869 -0.84320333 -0.48964922 -4.85825675 0.55672881 0.26108141 s(maxtemp).3 s(maxtemp).4 s(maxtemp).5 s(maxtemp).6 s(maxtemp).7 s(maxtemp).8 s(maxtemp).9 s(windspeed).1 s(windspeed).2 s(windspeed).3 s(windspeed).4 s(windspeed).5 s(windspeed).6 s(windspeed).7 s(windspeed).8 0.11775489 0.52515021 -0.47438941 -1.23068993 -1.01401703 -0.97945967 -3.47972451 2.59486238 0.80366715 0.87556554 0.88319105 1.64710232 1.39131761 1.03058868 1.10496623 s(windspeed).9 s(transport).1 s(transport).2 s(transport).3 s(transport).4 s(transport).5 s(transport).6 s(transport).7 s(transport).8 s(transport).9 0.86143533 -0.92804349 -0.81012945 -1.75752608 -1.20780659 -1.00271267 -1.79162143 -1.77980726 -1.80950105 -1.32644421 the predict value is: 15531.17181 does anyone can help me and let me know how to calculate this predict value?! I really want to know! Thank! -- View this message in context: http://r.789695.n4.nabble.com/How-to-calculate-the-predicted-value-by-using-GAMs-tp4634317.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.