Hello I have a question regarding gam.check() I understand that small p-values in the output of gam.check() indicate that residuals are not randomly distributed. This often means there are not enough basis functions. However, If I try to increase the basis functions I get the following error : Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) : A term has fewer unique covariate combinations than specified maximum degrees of freedom
From reading on this error the solution is to reduce the k value. So my question is: Is it ok to leave the k number as high as it can be so I can run the model without getting the error above, even if the gam.check() function suggest I have to increase the number.