kappa4al: Sigmoidal curve fitting.

Description Usage Arguments Value Methods (by class) Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
kappa4al(formula, data = list(), lower, upper, q1, q2, tol, maxiter, ...)

## Default S3 method:
kappa4al(formula, data = list(), lower = c(0, -5, -5),
  upper = c(10, 1, 1), q1, q2, tol = 1e-15, maxiter = 50000, ...)

## S3 method for class 'kappa4al'
print(x, ...)

## S3 method for class 'kappa4al'
summary(object, ...)

## S3 method for class 'summary.kappa4al'
print(x, ...)

## S3 method for class 'formula'
kappa4al(formula, data = list(), lower = c(0, -5, -5),
  upper = c(10, 1, 1), q1, q2, tol = 1e-15, maxiter = 50000, ...)

## S3 method for class 'kappa4al'
predict(object, newdata = NULL, ...)

Arguments

formula

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

data

A data.frame which contains the variables in formula.

lower

A vector of lower constraints for the parameters to be estimated; defaults to c(0, -5, -5).

upper

A vector of upper constraints for the parameters to be estimated; defaults to c(10, 1, 1).

q1, q2

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

tol

Error tolerance level; defaults to 1e-15.

maxiter

The maximum number of iterations allowed; defaults to 50000.

...

Arguments to be passed on to the differential evolution function JDEoptim.

x

A kappa4al object.

object

A kappa4al object.

newdata

The data on which the estimated model is to be fitted.

Value

A generic S3 object with class kappa4al.

kappa4al.default: A list with all components from JDEoptim, as well as:

summary.kappa4al: A list of class summary.kappa4al with the following components:

print.summary.kappa4al: The object passed to the function is returned invisibly.

predict.kappa4al: A vector of predicted values resulting from the estimated model.

Methods (by class)

Examples

1
2
3
4
5
6
7
8
9
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))
kappa4nls.default(y~x, q1=c(0.025, 0.5), q2=c(0.5, 0.975), tol=1e-5)

u <- seq(qkappa4(0.1, 4, 0.4, -4, k), qkappa4(0.8, 4, 0.4, -4, k), length.out=100)
v <- sapply(u, function(i) pkappa4(i, 4, 0.4, -4, k))
al <- kappa4al(y~x, q1=c(0.025, 0.5), q2=c(0.5, 0.975), tol=1e-5)
predict(al, newdata=data.frame(y=v, x=u))

mtloots/alR documentation built on May 23, 2019, 8:18 a.m.