Learn R Programming

alR (version 2.2.0)

alKDEboot: Arc length matching for kernel density estimators.

Description

Bootstrap estimates, along with standard errors and confidence intervals, of a linear model, resulting from arc length matching of kernel density estimates.

Usage

alKDEboot(formula, data = list(), xin, q1, q2, type, bootstraps, bootName,
  ...)

# S3 method for default alKDEboot(formula, data = list(), xin, q1, q2, type, bootstraps, bootName, ...)

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

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

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

# S3 method for formula alKDEboot(formula, data = list(), xin, q1, q2, type, bootstraps, bootName, ...)

# S3 method for alKDEboot 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 equal to the number of independent variables, of initial values, for the parameters to be estimated.

q1, q2

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

type

An integer specifying the bandwidth selection method used, see bw.

bootstraps

An integer giving the number of bootstrap samples.

bootName

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

...

Arguments to be passed on to the control argument of the optim function.

x

An alKDEboot object.

object

An alKDEboot object.

newdata

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

Value

A generic S3 object with class alKDEboot.

alKDEboot.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.

  • coefDist The bootstrap parameter distribution.

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

  • df: Degrees of freedom of the model.

  • 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.

  • h_y: The KDE bandwidth estimator for the dependent variable.

  • h_X: The KDE bandwidth estimator for the independent variables, i.e. \(\mathbf{X}\underline{\hat{\beta}}\).

  • ALy: Arc length segments of the KDE cast over the dependent variable.

  • ALX: Arc length segments of the KDE cast over the independent variables \(\mathbf{X}\underline{\hat{\beta}}\). p1: The vector of quantiles in the domain of \(y\) corresponding to q1. p2: The vector of quantiles in the domain of \(y\) corresponding to q2.

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

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

  • call: Original call to the alKDEboot 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. The final row corresponds to the estimated bandwidth parameters for each, i.e. h_y and h_X, respectively.

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

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

  • sigma: The residual standard error.

  • df: Degrees of freedom for the model.

  • 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.alKDEboot: The object passed to the function is returned invisibly.

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

Methods (by class)

  • default: default method for alKDEboot.

  • alKDEboot: print method for alKDEboot.

  • alKDEboot: summary method for alKDEboot.

  • summary.alKDEboot: print method for summary.alKDEboot.

  • formula: formula method for alKDEboot.

  • alKDEboot: predict method for alKDEboot.