Custom Link function works for GLM but not mgcv GAM
问题 Apologies if the answer is obvious but I've spent quite some time trying to use a custom link function in mgcv.gam In short, I want to use a modified probit link from package psyphy ( I want to use psyphy.probit_2asym, I call it custom_link ) I can create a {stats}family object with this link and use it in the 'family' argument of glm. m <- glm(y~x, family=binomial(link=custom_link), ... ) It does not work when used as an argument for {mgcv}gam m <- gam(y~s(x), family=binomial(link=custom