Hello everyone,

Any insights into the differences of splines used in each algorithm would be really helpful.

I’m particularly interested in whether these algorithms use cubic splines, natural splines, or smoothing splines, and how each type influences the line's shape, flexibility, and fit quality in the model.

Understanding the advantages or limitations each spline type brings to the algorithm would also be really helpful.

ggplot(df, aes(x=x, y=y)) +

geom_smooth(method = 'glm',

method.args = list(family = "binomial"),

formula = y ~ splines::ns(x, 3)) #I guess this uses natural splines as indicated by the ::ns

ggplot(df, aes(x=x, y=y)) +

geom_smooth(method = 'gam',

method.args = list(family = "binomial"),

formula = y ~ s(x, bs = "cs")) #cubic spline with shrinkage component?

ggplot(df, aes(x=x, y=y)) +

geom_smooth(method = 'gam',

method.args = list(family = "binomial"),

formula = y ~ s(x, bs = "cr")) #cubic regression spline?