Degrees of freedom (DOF) is the number of independent parameters in a
Sum of Squares (SS). If there are
n data points, the total number of degrees of freedom in the corrected sum of squares for the dataset is
(n-1). If a model with
p parameters or coefficients is used to fit the data, then
(n-1-p) degrees of freedom remain to estimate the error. These are called the residual degrees of freedom. You should always ensure that there is more than one degree of freedom left to estimate the error.