Learn R Programming

pla (version 0.2)

assayModel-class: Create a parallel line assay model

Description

Create a parallel line assay model, with optional imputation of data.

Usage

pla(data, alpha  = 0.05, indexOfReference = 1, StdName  = sampleLabels[indexOfReference], sampleLabels  = "data", imputeMissing  = FALSE, dfAdjustment  = NA, dilutionRatio  = NA, factor  = NA, selectFun  = function (array) NULL, echoData  = TRUE, colors  = "default", projectTitle  = "", assayTitle  = "", design  = "", ...) plaCRD(data, alpha = 0.05, imputeMissing = FALSE, dfAdjustment = NA, dilutionRatio = NA, factor = NA, echoData = TRUE, colors = "default", projectTitle = "", assayTitle = "") plaRBD(data, alpha = 0.05, imputeMissing = FALSE, dfAdjustment = NA, dilutionRatio = NA, factor = NA, echoData = TRUE, colors = "default", projectTitle = "", assayTitle = "") plaLSD(data, alpha = 0.05, imputeMissing = FALSE, dfAdjustment = NA, dilutionRatio = NA, factor = NA, echoData = TRUE, colors = "default", projectTitle = "", assayTitle = "")

Arguments

data
An object of class assayData-class (returned from readAssayTable) or a data.frame as returned from data2assayFrame or assayTable2frame.
sampleLabels
A vector of character strings giving the labels of the samples. By default, "data", the labels are extracted from the data. If the resulting column "Sample" from data has one of these values, then these rows are used in fits and plots.
indexOfReference
Index of the reference among the samples given by sampleLabels.
StdName
A character string identifying the reference among the Samples of the input data data. By default, this is sampleLabels[indexOfReference].
imputeMissing
A boolean. If TRUE then imputation is used for missing values.
alpha
A numeric, the level of significance for test of validity, and also used for confidence intervals, default 0.05. See pla.fit.
dfAdjustment
The needed adjustment of the number of degrees of freedom, if e.g. data are corrected for blocks, rows or columns before applying the model of the completely randomized design on block designs.
dilutionRatio
The dilution ratio of the "equally spaced" dilutions.
factor
A numeric to multiply on the estimated potency.
selectFun
A function taking as argument the array of all read factors, and returning the three-dimensional array of the model. Factors and dimensions can be deleted, or treatments (samples and/or doses) selected.
echoData
A boolean. If TRUE then the data table is printed.
colors
A vector of text strings for the colors of preparations.
projectTitle
A character string.
assayTitle
A character string.
design
"crd", "rbd" or "lsd" for respectively "completely randomized design", "randomized block design", and "latin squares design".
...
Arguments for impute: epsilon, maxit, and trace.

Value

pla-class, plaCRD-class, plaLSD-class, or plaRBD-class.

Details

assayTable2frame and data2assayFrame returns an object of class data.frame. readAssayTable returns an object of class assayFrame-class or assayTable-class, which both also are of (contains) class assayData-class. Objects of classes assayData-class and data.frame are turned into models by the functions plaCRD, plaRBD, and plaLSD for respectively completely randomized design, randomized block design, and latin squares design.

The functions print, show, plot, and fit are available for returned objects of class pla-class of these functions. The returned object of fit has the usual methods of lm plus the function potency.

pla (also called by plaCRD, plaRBD, and plaLSD) does the job of checking the input data, and adding necessary variables for pla.fit and pla.plots. The model is specified by the design argument, or slot of the argument data object. Similar for dfAdjustment, factor, and dilutionRatio. The preference here is that if the argument is given to pla, the value of this argument is used. Else, if the value is found in the argument object data, that value is used. If the argument is not given, and the value neither is found in the argument object with data, then a default value, "crd", 0 or 1, is used. Also the significance level, and default colors and titles for plots are set. Last but not least, imputation of data is performed in pla, if this is wanted, by setting imputeMissing to TRUE. Thus the imputed data in the resulting object can be inspected before the model is fitted, and the imputation is performed separated from the reading the data. The imputation is performed as described in Ph.Eur. (EUROPEAN PHARMACOPOEIA). See also Bliss (1952).

References

Chapter 5.3. Statistical analysis. In EUROPEAN PHARMACOPOEIA version 8.0, 2014; 607-635. Bliss, C.I. (1952): The Statistics of Bioassay - with special reference to the vitamin. Academic Press, New York.

See Also

pla-package