conf_bands: Confidence interval for a scluminex object

Description Usage Arguments Details Value References See Also Examples

View source: R/conf_bands.R

Description

Computes confidence or prediction interval for the response variable given a concentration value.

Usage

1
2
conf_bands(x, analyte = NULL, xvalue, level = 0.95,
  interval = "confidence")

Arguments

x

a scluminex object.

analyte

character vector specifying the analytes to estimate the interval. Default NULL (all analytes).

xvalue

vector of numeric values of the concentration.

level

numeric value for interval confidence or prediction level. Default 0.95.

interval

character defining type of interval, either 'confidence' or 'prediction'. Default 'confidence'.

Details

Two types of interval can be estimated 'prediction' interval and 'confidence' interval. If the did not converge the function returns NA for all xvalue. If the function cannot estimate the value NaN is returned.

Value

A data.frame with predicted response, lower and upper confidence (prediction) limits, standard error, concentration value, analyte, interval method and background method.

References

Ruckstuhl, A. (2010). Introduction to Nonlinear Regression. http://stat.ethz.ch/~stahel/courses/cheming/nlreg10E.pdf

See Also

predict.nls

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Load data and fit models
data(ecdata)
data(mfidata)

plate1 <- mfidata[mfidata$plate=="plate_1",]
datasets <- data_selection(plate1, ecfile = ecdata)

background <- datasets[[1]]$background
standard <- datasets[[1]]$standard
mod <- scluminex(plateid = "plate_1", standard = standard,
background = background, bkg = "ignore",lfct="SSl4",
fmfi = "mfi", verbose = FALSE)

# Confidence-prediction intervals for FGF analyte
conf_bands(mod, "FGF", xvalue = c(1,3,4), interval = "confidence")
conf_bands(mod, "FGF", xvalue = c(1,3,4), interval = "prediction")

# For all analytes the prediction interval
conf_bands(mod, xvalue = 0.5, interval = "prediction")

drLumi documentation built on May 2, 2019, 2:45 p.m.

Related to conf_bands in drLumi...