MixedModels.jl icon indicating copy to clipboard operation
MixedModels.jl copied to clipboard

Custom link function for Binomial regression

Open filippogambarota opened this issue 2 years ago • 2 comments

Hi, Is there a way to specify a custom link function similar to lme4? In my case, I would customize the logit link in a way that the lower bound is the chance level (e.g., 0.5) instead of 0 as done in the psyphy::mafc.logit() function in R. Thank you!

filippogambarota avatar Nov 30 '23 08:11 filippogambarota

The mechanism for handling the GLM family and link functions is imported from the GLM.jl package so I would first look there to extend the available families. From src/MixedModels.jl

using GLM: Link, canonicallink, linkfun, linkinv, dispersion, dispersion_parameter

It is embarrassing that I need to ask this but is there a repository where I can read the sources for the psyphy package or do I need to download and expand the tar file from CRAN? I didn't see a repository listed on CRAN and I didn't find a github account for Ken Knoblauch.

dmbates avatar Dec 04 '23 17:12 dmbates

Thank you @dmbates for your answer. In fact there is no official Github repo. I've found this mirror https://github.com/cran/psyphy/blob/master/R/mafc.R where there is there R code for the link function. In this case I was trying to implement the mafc.logit.

filippogambarota avatar Dec 04 '23 18:12 filippogambarota