tef_link_logistic: Construct a logistic link function parameterized with...

View source: R/tef_link_logistic.R

tef_link_logisticR Documentation

Description

Function is under development and is likely to be buggy, and to change frequently.

Usage

tef_link_logistic(
  changeForm,
  linkX,
  changePar = c("threshold", "bias"),
  threshVal = 0.75,
  lapseRate = 0.005,
  boundScale = 2,
  constantPar_prior = "normal(0,3)"
)

Arguments

changeForm

The formula describing the change in either threshold or bias

linkX

Character. The name of the "x" variable in the logistic link function (e.g., stimulus strength in a psychometric function)

changePar

Character. Which variable, "threshold" or "bias", changes over time. The other one is stable over time; the stable component inherits its formula from the asymptote parameter of the changing component.

threshVal

The threshold at which to evaluate the logistic function (i.e., the y-value for which threshold describes the x-value).

lapseRate

The offset, from 0 or 1, of the logistic function at arbitrarily large (positive or negative) values of linkX. A small lapse rate improves model fit (see Wichmann and Hill, 2001, P&P).

boundScale

Currently not implemented. Upper threshold of threshold estimates, as a multiple of the maximum absolute linkX.

constantPar_prior

The prior to put on the constant component of the logistic function (i.e., either the bias or the log threshold). Only relevant if passing the model to a brm model (e.g., with TEbrm).

Details

If bias is changing, threshold inherits its formula from asymptotic bias. If threshold is changing, bias inherits its formula from asymptotic threshold.

Examples


equation_to_fit <- tef_link_logistic( tef_change_expo3('trialNum', parForm = ~ (1|subID)) , linkX = 'ratio' )


akcochrane/TEfits documentation built on June 12, 2025, 11:10 a.m.