Description Usage Arguments Details Value Examples
View source: R/FunctionsPoDParameters.R
Function calculates the root mean squared error (RMSE) between provided PoD values and calculated PoD values. The latter are calculated using for provided titers and provided PoD curve parameters.
By using the input titers PoDParamPointEstimation
function and median of the estimated set of PoD curve parameters (output of PoDParamEstimation
function), the point estimate of PoD curve can be obtained (for details see PoDParamPointEstimation
function).
1 | fitPoD(params, TitersInput, CurveTitersMedian)
|
params |
named data frame ("pmax", "slope", "et50"): provided PoD curve parameters |
TitersInput |
numeric vector: provided titers |
CurveTitersMedian |
numeric vector: provided PoD values |
RMSE = sqrt( mean( (PoDmedian(titers) - PoDoptimized(titers))2 ) )
negative RMSE
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 | ## Data preparation
data(estimatedParameters)
data(PoDParams)
## Example 1
# grid of titers
TitersInput <- seq(from = 0, to = 20, by = 0.01)
# for each estimated PoD curve calculate functional values
functionValues <-
matrix(NA,
nrow = nrow(estimatedParameters$resultsPriorReset),
ncol = length(TitersInput))
for (i in 1:nrow(estimatedParameters$resultsPriorReset)) {
functionValues[i,] <- PoD(TitersInput,
pmax = estimatedParameters$resultsPriorReset[i,1],
et50 = estimatedParameters$resultsPriorReset[i,3],
slope = estimatedParameters$resultsPriorReset[i,2], adjustTiters = FALSE)
}
# functional values corresponding to the median of the estimated PoD curve parameters
CurveTitersMedian <- apply(functionValues, 2, median)
# squared error of CurveTitersMedian and functional values of "params" curve
fitPoD(PoDParams, TitersInput, CurveTitersMedian)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.