Learn R Programming

mcr (version 1.2.1)

mc.bootstrap: Resampling estimation of regression parameters and standard errors.

Description

Generate jackknife or (nested-) bootstrap replicates of a statistic applied to data. Only a nonparametric ballanced design is possible. For each sample calculate point estimations and standard errors for regression coefficients.

Usage

mc.bootstrap(method.reg = c("LinReg", "WLinReg", "Deming", "WDeming", "PaBa",
  "PaBaLarge"), X, Y, error.ratio, nsamples = 1000, jackknife = TRUE,
  bootstrap = c("none", "bootstrap", "nestedbootstrap"), nnested = 25,
  iter.max = 30, threshold = 1e-08, NBins = 1e+06,
  slope.measure = c("radian", "tangent"))

Arguments

X

Measurement values of reference method

Y

Measurement values of test method

error.ratio

Ratio between squared measurement errors of reference- and test method, necessary for Deming regression. Default 1.

method.reg

Regression method. It is possible to choose between five regression types: "LinReg" - ordinary least square regression, "WLinReg" - weighted ordinary least square regression,"Deming" - Deming regression, "WDeming" - weighted Deming regression, "PaBa" - Passing-Bablok regression.

bootstrap

Bootstrap based confidence interval estimation method.

jackknife

Logical value. If TRUE - Jackknife based confidence interval estimation method.

nsamples

Number of bootstrap samples.

nnested

Number of nested bootstrap samples.

iter.max

maximum number of iterations for weighted Deming iterative algorithm.

threshold

Numerical tolerance for weighted Deming iterative algorithm convergence.

NBins

number of bins used when 'reg.method="PaBaLarge"' to classify each slope in one of 'NBins' bins of constant slope angle covering the range of all slopes.

slope.measure

angular measure of pairwise slopes used for exact PaBa regression (see mcreg for details). "radian" - for data sets with even sample numbers median slope is calculated as average of two central slope angles. "tangent" - for data sets with even sample numbers median slope is calculated as average of two central slopes (tan(angle)).

Value

a list consisting of

glob.coef

Numeric vector of length two with global point estimations of intercept and slope.

glob.sigma

Numeric vector of length two with global estimations of standard errors of intercept and slope.

xmean

Global (weighted-)average of reference method values.

B0jack

Numeric vector with point estimations of intercept for jackknife samples. The i-th element contains point estimation for data set without i-th observation

B1jack

Numeric vector with point estimations of slope for jackknife samples. The i-th element contains point estimation for data set without i-th observation

B0

Numeric vector with point estimations of intercept for each bootstrap sample. The i-th element contains point estimation for i-th bootstrap sample.

B1

Numeric vector with point estimations of slope for each bootstrap sample. The i-th element contains point estimation for i-th bootstrap sample.

MX

Numeric vector with point estimations of (weighted-)average of reference method values for each bootstrap sample. The i-th element contains point estimation for i-th bootstrap sample.

sigmaB0

Numeric vector with estimation of standard error of intercept for each bootstrap sample. The i-th element contains point estimation for i-th bootstrap sample.

sigmaB1

Numeric vector with estimation of standard error of slope for each bootstrap sample. The i-th element contains point estimation for i-th bootstrap sample.

nsamples

Number of bootstrap samples.

nnested

Number of nested bootstrap samples.

cimeth

Method of confidence interval calculation (bootstrap).

npoints

Number of observations.

References

Efron, B., Tibshirani, R.J. (1993) An Introduction to the Bootstrap. Chapman and Hall. Carpenter, J., Bithell, J. (2000) Bootstrap confidence intervals: when, which, what? A practical guide for medical statisticians. Stat Med, 19 (9), 1141--1164.