Asking for a friendly soul that knows how to fix this error or that understands why this is appearing.

Not exactly sure what happened but this error appears every time I try to do a GAM with random effects (bs="re", with mgcv package). This is strange since appears not only to new models but even to models that previously worked (multiple times). I made sure the data has no NA's, scientific data, or random formulas. Also, I am not using the date format to avoid errors has previously worked as it is.

I also tried to transform the data into a data frame via as.data.frame(x) but the same error occurred.

I have been playing a bit with the formula and it appears that every time the random effects bs="re" are present, either the 2 of them (Site, State) or only one of them (Site), it is when the error occurs. If I take them completely out of the formula it works perfectly.

I am thinking that could be:

  • Some incompatibility with another package that I may have installed but tried to solve this with no effect. Removed all the most recently installed packages and the error persisted.
  • Other could be any update to the mgcv package?
  • Does anyone have an idea on how to fix this or why this is appearing

    ```

    gam_2a

    More Catarina Serra Gonçalves's questions See All
    Similar questions and discussions