Learn R Programming

alR (version 2.2.0)

kappa4alBoot: Sigmoidal curve fitting.

Description

Bootstrap estimates, along with standard errors and confidence intervals, of a nonlinear model, resulting from arc length fitting of the four-parameter kappa sigmoidal function.

Usage

kappa4alBoot(formula, data = list(), xin, lower, upper, q1, q2, tol, maxiter,
  bootstraps, bootName, ...)

# S3 method for default kappa4alBoot(formula, data = list(), xin, lower = c(0, -5, -5), upper = c(10, 1, 1), q1, q2, tol = 1e-15, maxiter = 50000, bootstraps, bootName, ...)

# S3 method for kappa4alBoot print(x, ...)

# S3 method for kappa4alBoot summary(object, ...)

# S3 method for summary.kappa4alBoot print(x, ...)

# S3 method for formula kappa4alBoot(formula, data = list(), xin, lower, upper, q1, q2, tol, maxiter, bootstraps, bootName, ...)

# S3 method for kappa4alBoot 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.

xin

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

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.

bootstraps

An integer giving the number of bootstrap samples.

bootName

The name of the .rds file to store the kappa4alBoot object. May include a path.

...

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

x

A kappa4alBoot object.

object

A kappa4alBoot object.

newdata

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

Value

A generic S3 object with class kappa4alBoot.

kappa4alBoot.default: A list object (saved using saveRDS in the specified location) with the following components:

  • intercept: Did the model contain an intercept TRUE/FALSE?

  • coefficients: A vector of estimated coefficients.

  • bcoefficients: A vector of bootstrap coefficients, resulting from bootstrap estimation.

  • se: The standard errors for the estimates resulting from bootstrap estimation.

  • error: The value of the objective function.

  • errorList: A vector of values of the objective function for each bootstrap sample.

  • fitted.values: A vector of estimated values.

  • residuals: The residuals resulting from the fitted model.

  • call: The call to the function.

  • time: Min, mean and max time incurred by the computation, as obtained from comm.timer.

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

  • call: Original call to the kappa4alBoot function.

  • coefficients: A matrix with estimates, estimated errors, and 95% parameter confidence intervals (based on the inverse empirical distribution function).

  • arclengths: A matrix of the arc length segments that were matched, for the dependent and independent variables.

  • r.squared: The \(r^{2}\) coefficient.

  • sigma: The residual standard error.

  • error: Value of the objective function.

  • time: Min, mean and max time incurred by the computation, as obtained from comm.timer.

  • residSum: Summary statistics for the distribution of the residuals.

  • errorSum: Summary statistics for the distribution of the value of the objective function.

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

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

Methods (by class)

  • default: default method for kappa4alBoot.

  • kappa4alBoot: print method for kappa4alBoot.

  • kappa4alBoot: summary method for kappa4alBoot.

  • summary.kappa4alBoot: print method for summary.kappa4alBoot.

  • formula: formula method for kappa4alBoot.

  • kappa4alBoot: predict method for kappa4alBoot.