Learn R Programming

YEAB (version 1.0.6)

exp_fit: Exponential fit with nls

Description

This function performs an exponential fit using non-linear least squares (nls).

Usage

exp_fit(value, delay, initial_guess, max_iter = 1e+05, scale_offset = 0)

Value

An object of class nls containing the fitted model.

Arguments

value

A numeric vector of the subjective values (indifference points).

delay

A numeric vector of the delays used in the experiment.

initial_guess

A numeric value providing an initial estimate for the parameter k.

max_iter

An integer specifying the maximum number of iterations for the nls fitting algorithm. Default is 1e5.

scale_offset

A numeric value for the scaling offset used in nls fitting control. Default is 0.

Examples

Run this code
# See the examples of hyp_fit

Run the code above in your browser using DataLab