nwfsc-cb / Threshold-Detection

Repo for simulation studies to explore detectability of ecological thresholds
1 stars 0 forks source link

Change default smooth in mgcv? #2

Open ericward-noaa opened 1 year ago

ericward-noaa commented 1 year ago

Right now the code is using thin plate splines with 'k' specified. The approach is described well here: https://stats.stackexchange.com/questions/486109/gams-specifying-knots-positions-for-thin-plate-regression-splines

It might be useful to modify this and change to something other than bs = "tp". Options could be "ps", "gp", etc. See here:

https://github.com/raine-detmer/Threshold-Detection/blob/5f6312e18c4b0c004b09ea739adb2cd1a2bdcf4e/functions/gamfun.R#L32

ericward-noaa commented 1 year ago

To this point, this could be another angle to explore -- which type of smooth is most effective at identifying thresholds in the kind of data we're working with