ToonVanDaele / trias-test

test repository ofr trias
0 stars 0 forks source link

Error while using GAM with covariate for compensating research effort bias #6

Closed damianooldoni closed 4 years ago

damianooldoni commented 4 years ago

Trying to reproduce your results while using covariate (cobs) in the GAM function. I get the error below while running gam function code, see https://github.com/ToonVanDaele/trias-test/blob/master/R/5d_method_GAM_pa.R#L122-L125.

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

Taxon key used: 1031400. Number of years: 7, from 2011 to 2017.

Taxon key used: 1008955. Number of years: 7, from 2009 to 2017.

Any idea? both seem quite well populated time series. Thanks in advance.

damianooldoni commented 4 years ago

I think we solved this.