In: Statistics and Probability
The residual degrees of freedom is defined as the number of response values n minus the number of fitted coefficients p estimated from the response values.
Here df denotes the number of independent pieces of information involving the n data points that are required to calculate the sum of squares. Note that if parameters are bounded and one or more of the estimates are at their bounds, then those estimates are regarded as fixed. The degrees of freedom is increased by the number of such parameters.but to increase the df you have to increase the value of n sometimes.