est_conc: Estimates concentration given an scluminex object

Description Usage Arguments Details Value Examples

View source: R/est_conc.R

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

1
2
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.

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.

Value

Input data.frame with the following merged variables:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# 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)

Example output

  analyte   sample   plate   well    mfi        ec warning log10.fitted.conc
1     FGF Control1 plate_1  P1_B1 2902.0 1150.0000                 2.7670472
2     FGF Control1 plate_1 P1_G10 3173.5 1150.0000                 2.8704865
3     FGF Control2 plate_1  P1_B2  440.0  143.7500                 1.8702911
4     FGF Control2 plate_1 P1_G11  435.0  143.7500                 1.8667074
5     FGF Control3 plate_1  P1_B3   40.0   21.2963                 0.9635245
6     FGF Control3 plate_1 P1_G12   36.0   21.2963                 0.8886454
  log10.fitted.conc.se dilution dil.fitted.conc dil.lb.conc dil.ub.conc
1           0.03614467        1      584.853627  488.608905  700.056347
2           0.04404870        1      742.141172  596.108199  923.948907
3           0.01475733        1       74.180727   68.930244   79.831145
4           0.01472403        1       73.571119   68.375109   79.161987
5           0.02747050        1        9.194423    8.020068   10.540734
6           0.02966791        1        7.738296    6.676544    8.968896
  analyte   sample   plate   well    mfi        ec warning log10.fitted.conc
1     FGF Control1 plate_1  P1_B1 2902.0 1150.0000                 2.7670472
2     FGF Control1 plate_1 P1_G10 3173.5 1150.0000                 2.8704865
3     FGF Control2 plate_1  P1_B2  440.0  143.7500                 1.8702911
4     FGF Control2 plate_1 P1_G11  435.0  143.7500                 1.8667074
5     FGF Control3 plate_1  P1_B3   40.0   21.2963                 0.9635245
6     FGF Control3 plate_1 P1_G12   36.0   21.2963                 0.8886454
  log10.fitted.conc.se dilution dil.fitted.conc dil.lb.conc dil.ub.conc
1           0.03614467        2      1169.70725   977.21781  1400.11269
2           0.04404870        2      1484.28234  1192.21640  1847.89781
3           0.01475733        2       148.36145   137.86049   159.66229
4           0.01472403        2       147.14224   136.75022   158.32397
5           0.02747050        2        18.38885    16.04014    21.08147
6           0.02966791        2        15.47659    13.35309    17.93779

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

Related to est_conc in drLumi...