[R] 2 bands (confidence and prediction) on the same GAM plot?

2023-05-01 Thread varin sacha via R-help
Dear R-experts, Here below my R code (toy example) working! The only thing missing is in my GAM plot: I would like to get on the same graph the 2 bands (prediction and confidence bands) like in my lm model graph! Is it possible? How to get that?

Re: [R] NaN response with gam (mgcv library)

2023-05-01 Thread varin sacha via R-help
Dear Simon, Thanks ! It works ! Best, Le lundi 1 mai 2023 à 11:19:26 UTC+2, Simon Wood a écrit : try... sum(residuals(model1)^2) On 30/04/2023 22:03, varin sacha via R-help wrote: > Dear R-experts, > > Here below my R code. I get a NaN response for gam with mgcv library. How to

Re: [R] NaN response with gam (mgcv library)

2023-05-01 Thread Simon Wood
try... sum(residuals(model1)^2) On 30/04/2023 22:03, varin sacha via R-help wrote: Dear R-experts, Here below my R code. I get a NaN response for gam with mgcv library. How to solve that problem? Many thanks. # library(mgcv) y=c(23,2