Learn R Programming

pla (version 0.2)

pla.fit: Estimation in parallel line models, with listing of results

Description

The main results are the estimate of potency with confidence interval and the anova table with tests of regression, parallelism and linearity. The anova table can also have test of effect of blocks for Randomized Block Design, and test of row and column for Latin Square Design.

Further the restricted and unrestricted models are fitted without effects of row, columns, and blocks. The models are fitted by lm, in combination with the function pheur325.

Results are listed directly, or returned in an object. These results can be typeset by LaTex - directly, or by the use of the package xtable.

Usage

fit(object, ...) pla.fit(data, sampleLabels = levels(unlist(data["Sample"])), indexOfReference = 1, StdName = sampleLabels[indexOfReference], design = "blocks", dfAdj = 0, dr = 2, factor = 1, alpha = 0.05, main = "Parallel Line Model", tag = "PLA", expectedAnova = NULL, expectedPotency = NULL, formatTests = "long", show = FALSE, sink = FALSE, Sweave = FALSE, printPotencyEstimates = TRUE, returnPotencyEstimates = TRUE)

Arguments

object
Object of class pla-class.
...
Arguments from tag to printPotencyEstimates of pla.fit. The other arguments for pla.fit are extracted from the object when using fit(object, ...).
data
The data.frame with relevant variables - created by data2assayFrame or assayTable2frame.
main
A character string giving with the main title for plot (created by pla.plots).
tag
A character string giving a part of names of output-files, see e.g. sink.
design
crd, blocks, or latin for selecting "Completely Randomized Design", "Randomized block design", or "Latin square design".
dr
The dilution ratio of the equally spaced dilutions.
dfAdj
The needed adjustment of the number of degrees of freedom, if data are corrected for blocks, rows or columns before applying the model of the completely randomized design on block designs, or if values are imputed.
sampleLabels
A vector of character strings giving the labels of the samples. If data["Sample"] has one of these values, then these rows are used. These labels are also used for labels of the returned values.
indexOfReference
Index of the reference among the samples given by sampleLabels.
StdName
A character string identifying the reference in the columns Sample of the input data data. If data["Sample"] has this value, then these rows are from the 'reference'.
formatTests
A vector of character string, "long", "short", "both", "none" to select format for results of validity tests.
show
A logical or subset of "head", "anova", "tests", "regressions", "ratios", "pheur", "rsquare", "slope", "logpotency", "potency"). If TRUE then all the results are reported.
sink
Output is diverted to paste(tag, "-Result.txt", sep = "") if this boolean is TRUE.
alpha
A numeric (vector), the level of significance for test of validity, default 0.05. alpha can be a named vector with the levels of significance for the tests of Regression, Linearity, Parallelism, and the complementary probability alpha of the Confidence interval of the potency. If more than one probability is supplied for one test of validity, then "Unknown" is reported for tests with probability between the supplied values, with counts of limits exceedded.
Sweave
If TRUE then code is inserted in the output listing for page breaking in LaTeX.
factor
A numeric (vector) to multiply on the estimated potency.
expectedAnova
A numeric matrix with the expected ANOVA table.
expectedPotency
A numeric matrix with the expected potency.
printPotencyEstimates
If TRUE then computed potency values are listed (for Sweave).
returnPotencyEstimates
If TRUE then computed potency values are returned.

Value

Examples

Run this code
data(Turbidimetric); Data <- Turbidimetric

Design <- "blocks"
Data   <- readAssayTable(paste(system.file(package = "pla"),
                           "vignettes/PhEur/data/AntibioticTurbidimetric.txt",
                           sep = "/"))
Frame  <- as.data.frame(Data, dr = 1.5)

fits   <- pla.fit(Frame, design = Design, sampleLabels = c("S", "T"),
                  dr = 1.5, returnPotencyEstimates = TRUE)

## Alternative on object of class 'pla':

plaModel <- plaRBD(Data)
Fits <- fit(plaModel)

Run the code above in your browser using DataLab