title: Is it possible to control the degrees of freedom for the smooth functions in a GAM fit in R, and if so, how?
body: <p>I am using the <code>mgcv</code> package in R to fit a GAM to some hydrologic data as follows:</p>
  
  <pre><code>d &lt;- GAM_example_data[,1:4]
  colnames(d) &lt;- c("month","rain","pump","GWL")             
  fitted_GAM &lt;- gam(GWL~s(month) + s(rain) + s(pump), data = d)
  plot.gam(fitted_GAM)
  </code></pre>
  
  <p>When I get the plots that are output from <code>plot.gam</code>, on the y-axis it tells me the degrees of freedom for each of the smoothing functions, and these are often non-integer values. <strong>I wish to be able to control the degrees of freedom for each of the smooth functions used, is there a way to do this?</strong></p>
  
  <p>I have seen references to specifying the "knots" and therefore controlling the fit but I am fairly new to the concept of GAMs and I haven't been able to find any clear resources explaining what these are (if they are even related to my problem at all).</p>