scluminex: Estimates different models for each analyte.

Description Usage Arguments Details Value Examples

View source: R/scluminex.R

Description

Given a dilutions points and background data.frame estimates a model (in a recursive way is possible) for a background method.

Usage

1
2
3
4
5
scluminex(plateid, standard, background, lfct,
    bkg = c("ignore","subtract", "include", "constraint"),
    neill.method = "finest", fmfi = "median", fec = "ec",
    fanalyte = "analyte", fwell = "well", fflag = "flag",
    verbose = TRUE, ...)

Arguments

plateid

character to identify the plate

standard

a data.frame with standard values information

background

a data.frame with the value of the blank controls.

lfct

a character vector of SelfStarting models for background method. They will be used in order if no convergence is achieved, ie: the first lfct first, if no convergence the second function, etc. Options are SSl5, SSl4 and SSexp.

bkg

character vector specifying how the background values are treated. Options are 'ignore', 'subtract', 'include' or 'constraint'.

neill.method

character specifying the grouping method for the Neill test. Default 'finest'. Other options 'c-finest', 'percentiles' or the name of the grouping variable.

fmfi

name of the column with MFI values

fec

name of the column with the concentration

fanalyte

name of the column with the name of the analyte

fwell

name of the variable with the well information

fflag

name of the variable with the flag to not include a record in the standard curve estimation

verbose

logical whether show the process of estimation.

...

other parameters for the model

Details

The models are fitted by the nlsLM function from the minpack.lm package. The background data can be ignore, or use to subtract the values of all MFI or be included as a point in the standard curve with a value half of the lower value of the standard points. If two or more blank controls are specified the geometric mean of the MFI is used. The names on the two datasets need to be the same and are specified by the fmfi, fec and fanalyte arguments of the function. The routine should receive the values of the MFI from the luminex fluorescence data. Analysis is performed in logarithm scale (base 10) both for the MFI and the concentrations.

The grouping variable for the neill.method can specified if there are replicates of doses in the assay. If there are no replicates one of the three 'grouping' methods can be selected.

Value

A list with the following components model, convergence, coef, data, rsquare

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Load data
data(ecdata)
data(mfidata)

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

sdf <- data_selection(dat, ecdata)$plate_1

# Fit model and summary object
igmodels <- scluminex("plate_1",sdf$standard, sdf$background,
                lfct=c("SSl4", "SSl5"),
                bkg="ignore",
                fmfi="mfi",
                verbose=FALSE)
ss <- summary(igmodels)

# Information
names(igmodels)
names(igmodels$FGF)

# Summary data
ss
as.data.frame(ss)
as.data.frame(igmodels)

# Plot the standard curve
plot(igmodels,"sc")

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

Related to scluminex in drLumi...