Learn R Programming

drLumi (version 0.1.2)

invest: Estimate the concentration given a response value

Description

Estimates the inverse of the funtion. Given a response value, estimates the corresponding concentration value and the standard error.

Usage

invest(x, analyte=NULL, yvalue, ci.method = c("delta", "bootstrap"), level = 0.95, seed.boot = 123, nboot = 100)

Arguments

x
a scluminex object.
analyte
the specific analyte to estimate the invert values. Default NULL (all analytes).
yvalue
value of the response model to estimate the inverse in log10 scale.
ci.method
character defining the method to be applied for estimating standard error ('delta' or 'bootstrap'). Default 'delta'.
level
confidence level. Default 0.95.
seed.boot
numeric for the seed of the bootstrap method. Only applies for bootstrap method. Default 123.
nboot
number of bootstrap replicates. Only applies for bootstrap method. Default 100.

Value

A data.frame with the following components:
  • MFI variable, the yvalue response vector
  • Fit of the concentration, concentration estimation of the yvalue vector
  • Fit of the concentration.lci, lower confidence bounds for the concentration estimation
  • Fit of the concentration.uci, upper confidence bounds for the concentration estimation
  • Fit of the concentration.se, estimation of the Standard Error of the concentration. If ci.method 'bootstrap' is NA

Details

Delta method function used is deltamethod from the msm package. Bootstrap method generates nboot response vectors (assuming normality) and fit the same model with original concentration data. The confidence interval is calculated by the percentile method specified in the level argument (1-level/2, 1-(1-level)/2).

Examples

Run this code
# Load data
data(ecdata)
data(mfidata)

dat <- mfidata[mfidata$plate=="plate_1" & mfidata$analyte=="FGF",]

# Estimate models
sdf <- data_selection(dat, ecdata)[[1]]
igmodels <- scluminex("plate_1",sdf$standard, sdf$background,
lfct="SSl4", bkg="ignore", fmfi="mfi", verbose=FALSE)

# Delta
invest(igmodels, "FGF", c(2, 2.5, 3),  "delta")

# Bootstrap
invest(igmodels, "FGF" ,c(2, 2.5, 3), "bootstrap", nboot=10)

Run the code above in your browser using DataLab