ch.RTfit: Fits the p(HVO) function for the choice experiment

ch.RTfitR Documentation

Fits the p(HVO) function for the choice experiment

Description

This function fits p(HVO) as a non-linear exponential decay function of an x variable (often overlap). It forces the first point to equal 1 and the last point is .5 on the y-axis. It outputs the fit of the function and the r_square.

Usage

ch.RTfit(x, y, grp = NULL)

Arguments

x

the x variable for the x-axis (often overlap).

y

the y variable for the y-axis (often p(hit)).

grp

the grouping variable that identifies those stimuli whose value are above the reference distribution and those that are below the reference distribution. When this variable is included, then the intercept parameter is allowed to vary for refHVO and refLVO, but the slope is kept constant. DEFAULT = NULL (the grouping variable is ignored)

Value

a list of the fit, r2 from the nls .

Examples

ch.RTfit (x,y, grp)

ccpluncw/ccpl_R_chutils documentation built on Feb. 28, 2024, 1:17 a.m.