refInterval {mcradds}R Documentation

Calculate Reference Interval and Corresponding Confidence Interval

Description

[Experimental]

This function is used to establish the reference interval for target population with parametric, non-parametric and robust methods that follows the CLSI-EP28A3 and NMPA guideline. In additional, it also provides the corresponding confidence interval for lower/upper reference limit if needed. Given that outliers should be identified beforehand, Tukey and Dixon methods can be applied depending on distribution of the data.

Usage

refInterval(
  x,
  out_method = c("doxin", "tukey"),
  out_rm = FALSE,
  RI_method = c("parametric", "nonparametric", "robust"),
  CI_method = c("parametric", "nonparametric", "boot"),
  refLevel = 0.95,
  bootCI = c("perc", "norm", "basic", "stud", "bca"),
  confLevel = 0.9,
  rng.seed = NULL,
  tol = 1e-06,
  R = 10000
)

Arguments

x

(numeric)
numeric measurements from target population.

out_method

(string)
string specifying the which outlier detection to use.

out_rm

(logical)
whether the outliers is removed or not.

RI_method

(string)
string specifying the which method for computing reference interval to use. Default is parametric, options can be nonparametric and robust.

CI_method

(string)
string specifying the which method for computing confidence interval of reference limit(lower or upper) to use. Default is parametric, options can be nonparametric and boot.

refLevel

(numeric)
reference range/interval, usual is 0.95.

bootCI

(string)
string specifying the which bootstrap confidence interval from boot.ci() function in boot package. Default is perc(bootstrap percentile), options can be norm(normal approximation), boot(basic bootstrap), stud(studentized bootstrap) and bca(adjusted bootstrap percentile).

confLevel

(numeric)
significance level for the confidence interval of reference limit.

rng.seed

(integer)
number of the random number generator seed for bootstrap sampling. If set to NULL currently in the R session used RNG setting will be used.

tol

(numeric)
tolerance for when the iterative process can be stopped in robust method.

R

(integer)
number of bootstrap replicates, is used in boot() function.

Value

A RefInt object contains relevant results in establishing of reference interval.

Note

There are some conditions of use to be aware of:

Examples

data("calcium")
x <- calcium$Value
refInterval(x, RI_method = "parametric", CI_method = "parametric")
refInterval(x, RI_method = "nonparametric", CI_method = "nonparametric")
refInterval(x, RI_method = "robust", CI_method = "boot", R = 1000)

[Package mcradds version 1.1.0 Index]