predict.sigfit: Predict method for "sigfit" function.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/methods.sigfit.R

Description

This function calculates predictions from the sigfit models in the scale of results. Major difference between this function and predict method for nls models is that predict.nls would make predictions in the scale of MFI.

Usage

1
2
    ## S3 method for class 'sigfit'
predict(object, newdata = NULL, e.fit = FALSE, ...)

Arguments

object

An object of class "sigfit" - fitted sigmoidal model.

newdata

Data for which to make predictions. If omitted (default), the predictions will be made for the standards that were used to fit the model. Otherwise, newdata can be an object of class "ima", or a regular data.frame with MFI data in the 1st column and a placeholder for calculated concentrations (predictions) in the second column; other columns are ignored. In case the first column in the data.frame is named in the fashion of "MFI.analyte-name", the "analyte-name" must match the name of the analyte in the model.

e.fit

Logical. If TRUE, fit prediction errors (in the percent scale) will be added to the result. The default is FALSE.

...

Currenly ignored.

Details

This function uses the inverse-sigmoid formula to make predictions from nls model in the scale of the result, instead of scale of "MFI".

Value

If provided with an object of class ima as an argument to newdata parameter, this function returns an object of the same type, but with the column of predictions added. Otherwise, it returns a numeric vector of predictions (for e.fit=FALSE) or a matrix of predictions and % error values (for e.fit=TRUE).

Author(s)

Michal J. Figurski, PhD mfigrs@gmail.com

See Also

sigfit

Examples

1
2
3
4
5
6
## Not run: 
    run = read.multiplex("your-path-here")
    fit = sigfit(run)
    predict(run)

## End(Not run)

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