Learn R Programming

drLumi (version 0.1.2)

est_conc: Estimates concentration given an scluminex object

Description

Given a scluminex object with standard curve information and a data.frame with response values add to the original dataset the concentration data.

Usage

est_conc(x, df, fanalyte = "analyte", fmfi = "median", dilution = 1, one.curve = FALSE, level = 0.95)

Arguments

x
a scluminex object.
df
input data.frame with the analyte and median fluorescence intensity variables.
fanalyte
name of the field with the analyte information. Default 'analyte'.
fmfi
name of the field with the mfi (response) information. Default 'median'.
dilution
numeric value of the dilution that must be used for the estimation of the concentration.
one.curve
logical according if only one curve must be used for estimation.
level
numeric value, confidence level, required. Default 0.95.

Value

Input data.frame with the following merged variables:
  • log10.fitted.conc, log10 fitted concentration
  • log10.fitted.conc.se, log10 standard error of the log10 fitted concentration
  • dilution, dilution to be applied to the samples
  • dil.fitted.conc, diluted fitted concentration in original scale
  • dil.lb.conc, diluted fitted lower bound concentration in original scale
  • dil.ub.conc, diluted fitted upper bound concentration in original scale
  • warning, warning message (if necessary)

Details

Given a scluminex object and a data.frame with analyte and MFI information adds the concentration information to the dataset (concentration, standard error of the concentration and a warning variable). The MFI data will be transformed into log10(MFI). The method utilized is the Delta method of invest function.

Merging variables are defined in the fanalyte and fmi arguments of the function.

If only one standard curve is fitted for several analytes one.curve argument must be specified to TRUE and scluminex must have only one analyte information. The same scluminex information will be used for all analytes of the df data.frame.

If one standard curve is fitted by each analyte one.curve must be FALSE, so the function will merge each model of the scluminex object with the corresponding analyte of the df argument.

Examples

Run this code
# Load data and fit models
data(ecdata)
data(mfidata)

dat <- mfidata[mfidata$plate=="plate_1" & mfidata$analyte=="FGF",]
sdf <- data_selection(dat, ecdata)$plate_1

igmodels <- scluminex("plate_1",sdf$standard, sdf$background,
            lfct="SSl4", bkg="ignore", fmfi="mfi", verbose=FALSE)

# Data to estimate concentration
concdf <- sdf$positive

# Dilution factor 1
est_conc(igmodels, concdf, fmfi="mfi", dilution = 1)

# Dilution factor 2
est_conc(igmodels, concdf, fmfi="mfi", dilution = 2)

Run the code above in your browser using DataLab