Description Usage Arguments Details Value Note Author(s) Examples
Check and prepare a dataframe
with data for pla,
pla.fit, and pla.plots.
1 2 3 4 | data2assayFrame(dataframe,
dr = 1.5,
Z = log((1/dr)^(max(Dilution) - Dilution)),
design = "lsd")
|
dataframe |
|
dr |
The dilution ratio of the geometric dilution serie with equally spaced dilutions (constant ratio between any adjacent dilutions) on the logarithmic scale. |
Z |
The 'concentration', by default computed as
log((1/dr)^{(max(Dilution) - Dilution)}), where |
design |
If "lsd", then |
This function is used internally in pla to check the
dataframe
that can be given with the data for pla.fit.
It can also be used to prepare a dataframe for direct call of
pla.fit.
Relevant columns are added for pla.fit,
and the dataframe
is sorted for pla.plots.
A data.frame.
The slope
for the potency
is computed relative to the added column Z
for complete data
analysis.
Z
is NOT used when computing the potency
for data without missing values by the method of Ph.Eur.
The dilution ratio dr
is also used in the function
pheur325 for computing the slope and potency (when
the design is complete, i.e. there are no missing values).
Thus if a geometric dilution serie not is used, the anova-table
and plots might be useful, but not the slope and potency
computed by pheur325 and thus by pla.fit.
Sample
and Step
are transformed to numerics
from possible factors (with the orderings of the levels of
these factors), and the order of Sample
and Step
are
then reverted. This might give some confusion. data2assayFrame
is called from pla, if a data.frame is found as the
argument, or as the relevant slot in an argument with this slot.
Use as.data.frame on the pla-object to view data data
as going into the fitting and plotting functions - for debugging.
Jens Henrik Badsberg
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 28 29 30 31 32 33 | # Example 1:
require(graphics)
Dilution <- 2 + log(ToothGrowth["dose"]) / log(2)
names(Dilution) <- "Dilution"
Replicate <- rep(1:10, 6)
Data <- cbind(ToothGrowth, Replicate, Dilution)
dimnames(Data)[[2]] <- c("Response", "Sample", "Dose", "Replicate", "Dilution")
Design <- "crd"
Frame <- data2assayFrame(Data, dr = 2, design = Design)
Fits <- pla.fit(Frame, sampleLabels = c("VC", "OJ"), dr = 2,
design = Design, main = "ToothGrowth", show = TRUE)
pla.plots(Frame, design = Design,
sampleLabels = c("VC", "OJ"), main = "ToothGrowth")
# Example 2:
data(AgarDiffusionAssay)
# Agar <- read.table("./pla/vignettes/PhEur/data/AntibioticAgarDiffusionAssay.txt",
# header = TRUE)
Agar <- AgarDiffusionAssay
Design <- "lsd"
select <- c("Row", "Column", "Sample", "Dilution", "Response")
Frame <- data2assayFrame(Agar[, select])
fits <- pla.fit(Frame, design = Design, sampleLabels = c("S", "T"),
dr = 1.5, returnPotencyEstimates = TRUE)
## Alternative on object of class 'pla':
plaModel <- plaLSD(Agar)
Fits <- fit(plaModel)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.