Learn R Programming

alR (version 2.2.0)

kappa4nlsShort: Sigmoidal curve fitting.

Description

A framework for nonlinear least squares fitting of the four-parameter kappa sigmoidal function.

Usage

kappa4nlsShort(formula, data = list(), xin, ...)

Arguments

formula

An LHS ~ RHS formula, specifying the linear model to be estimated.

data

A data.frame which contains the variables in formula.

xin

Numeric vector of length 3 containing initial values, for \(\sigma\), \(h\), and \(k\).

...

Arguments to be passed on to the outer control list of constrOptim.nl.

Value

kappa4nlsShort: A list with the following components:

  • coefficients: A vector of estimated coefficients.

  • error: The value of the objective function.

Details

A shortened version of kappa4nls.

Examples

Run this code
# NOT RUN {
k <- kappa4tc(-4, 0, 1)$par
x <- seq(qkappa4(0, 4, 0.4, -4, k), qkappa4(0.7, 4, 0.4, -4, k), length.out=100)
y <- sapply(x, function(i) pkappa4(i, 4, 0.4, -4, k))
kappa4nlsShort(y~x, xin=c(0.1, -3, -0.1))

# }

Run the code above in your browser using DataLab