JuliaStats / MixedModels.jl

A Julia package for fitting (statistical) mixed-effects models
http://juliastats.org/MixedModels.jl/stable
MIT License
407 stars 48 forks source link

Custom link function for Binomial regression #730

Open filippogambarota opened 11 months ago

filippogambarota commented 11 months ago

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!

dmbates commented 11 months ago

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.

filippogambarota commented 11 months ago

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.