I am trying to plot the trend of my GAM model with a confidence interval around modelled trend, but the confidence interval is very narrow, and I am assuming incorrect. However, I am unsure as to how to correct this.
I uploaded a dataset with data for the daily precipitation and daily increase in streamflow. I named these variables "Precipitation" and "DailyIcrease"
I then created a GAM model comparing the relationship between the daily increase in streamflow and the square root of the daily precipitation depth using the code:
m_pre_sqrt <- gam(DailyIncrease ~ s(sqrt(Precipitation)), data = pre, method = "REML")
Based on the model summary, this model has an r-squared value of 0.885, indicating that the precipitation is a very good predictor of the daily precipitation depth, which logically makes sense.
I plotted the model using the code:
plot(m_pre_sqrt, residuals = TRUE, pch = 20, xlab = "Square Root of Daily Precipitation Depth (mm)", ylab = "Square Root of Increase in Daily Stream Discharge (m3/s)", family = "A", xlim = c(0,8), ylim = c(0,12))
This code returned the following plot.
As shown by the plot above, there is a very narrow confidence interval, which leads me to believe that something is wrong. As shown in the plot above there are quite a few points between 2 and 5 mm that deviate from the regression curve, however, the confidence interval does not reflect this. I am thinking that something is definitely wrong. Does anyone have any advice? TIA