refLimit {referenceIntervals}R Documentation

Calculates and returns reference and confidence intervals for a dataset

Description

This function calculates a reference interval from a dataset using parametric, non-parametric, or robust methods.

Usage

refLimit(data, out.method = "horn", out.rm = FALSE, RI = "p", CI = "p",
refConf = 0.95, limitConf = 0.9, bootStat = "basic")

Arguments

data

A vector of data points.

out.method

The outlier detection method. Valid options include "horn", "cook", "dixon", and "vanderLoo".

out.rm

Remove outliers. If value is TRUE, outliers will be automatically removed prior to calculations. If FALSE (default), outliers will be detected but not removed.

RI

Method for reference interval calculations. Valid options include "p" (default) for parametric, "n" for non-parametric, and "r" for robust method.

CI

Method for confidence interval calculations. Valid options include "p" for parametric (default), "n" for non-parametric, and "boot" for bootstrapping method. The minimum samplesize for non-parametric confidence interval calculations is 120. With smaller samples, bootstrapping methods are used.

refConf

Desired coverage for the calculated reference interval. The default is a 95 interval.

limitConf

Desired confidence interval level. The default is a 90 reference interval limits.

bootStat

Method for calculating confidence intervals from package boot. Valid arguments include "basic" (basic bootstrap method), "perc" (bootstrap percentile method), "norm" (normal approximation method), "stud" (studentized bootstrap method), and "bca" (adjusted bootstrap percentile method).

Details

A confidence interval around each limit of the reference interval is calculated as a metric for determining the validity of the result. Outliers can be detected in one of four different methods and automatically eliminated.

To determine the most appropriate calculation for confidence intervals using the bootstrapping method, please consult chapter 5 of Davison and Hinkley's "Bootstrap Methods and their Applications."

Value

Returns a list of necessary information.

size

Size of dataset

dname

Name of dataset

out.method

Outlier detection method

out.rm

Boolean indicating whether outliers are automatically removed

outliers

Vector of detected outliers

methodRI

Method for reference interval calculations (p, n, or r)

methodCI

Method for confidence interval calculations (p, n, boot)

norm

Results of running Shapiro-Wilk and Kolmorgorov-Smirnov normacy tests

refConf

Desired coverage of reference interval

limitConf

Desired confidence interval level

Ref_Int

List containing the reference interval and confidence interval values

Author(s)

Daniel Finnegan

References

ASVCP reference interval guidelines: determination of de novo reference intervals in veterinary species and other related topics. Vet Clin Pathol 41/4 (2012) 441-453, 2012. American Society for Veterinary Clinical Pathology

Davison, A.C. and Hinkley, D.V. (1997) Bootstrap Methods and Their Application, Chapter 5. Cambridge University Press.

Examples


refLimit(set20, out.method = "dixon")
refLimit(set200, out.method = "cook", out.rm = TRUE, RI = "n", refConf = 0.9)
refLimit(set50, out.method = "vanderLoo", out.rm = TRUE, RI = "r", bootStat = "perc")


[Package referenceIntervals version 1.3.1 Index]