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

ch.pHVOfit.oldR 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.pHVOfit.old(x, y, useTwoParameterModel = FALSE)

Arguments

x

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

y

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

useTwoParameterModel

A boolean that specifies whether to use a two parameter model. If this is set to TRUE, then this function will fit a model whereby the rightmost point (overlap = 1.0) is not fixed at p(HVO) = 0.5. DEFAULT = FALSE.

Value

a list of the fit, r2 from the nls .

Examples

ch.pHVOfit.old (x,y)

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