Learn R Programming

alR (version 2.2.0)

kappa4alShort: Sigmoidal curve fitting.

Description

A framework for arc length fitting of the four-parameter kappa sigmoidal function.

Usage

kappa4alShort(formula, data = list(), xin, q1, q2, ...)

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\).

q1, q2

Numeric vectors, for the lower and upper bounds of the intervals over which arc lengths are to be computed.

...

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

Value

kappa4alShort: A list with the following components:

  • coefficients: A vector of estimated coefficients.

  • error: The value of the objective function.

Details

A shortened version of kappa4al.

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))
kappa4alShort(y~x, xin=c(0.1, -3, -0.1), q1=c(0.1, 0.5), q2=c(0.5, 0.9))

# }

Run the code above in your browser using DataLab