txpCalculateScores {toxpiR} | R Documentation |
Calculate ToxPi Scores for the given model and input data
Description
Calculate ToxPi Scores for the given model and input data
Usage
txpCalculateScores(model, input, ...)
## S4 method for signature 'TxpModel,data.frame'
txpCalculateScores(
model,
input,
id.var = NULL,
rank.ties.method = c("average", "first", "last", "random", "max", "min"),
negative.value.handling = c("keep", "missing")
)
## S4 method for signature 'TxpModelList,data.frame'
txpCalculateScores(
model,
input,
id.var = NULL,
rank.ties.method = c("average", "first", "last", "random", "max", "min"),
negative.value.handling = c("keep", "missing")
)
## S4 method for signature 'list,data.frame'
txpCalculateScores(
model,
input,
id.var = NULL,
rank.ties.method = c("average", "first", "last", "random", "max", "min"),
negative.value.handling = c("keep", "missing")
)
Arguments
model |
TxpModel object or TxpModelList object |
input |
data.frame object containing the model input data |
... |
Included for extendability; not currently used |
id.var |
Character scalar, column in 'input' to store in |
rank.ties.method |
Passed to |
negative.value.handling |
Passed to |
Details
txpCalculateScores
is implemented as an S4 generic function with methods
for TxpModel and TxpModelList.
Ranks are calculated such that the highest ToxPi score has a rank of 1.
Value
TxpResult or TxpResultList object
See Also
TxpModel, TxpResult, TxpResultParam
Examples
## Load example dataset & model; see ?TxpModel for building model objects
data(txp_example_input, package = "toxpiR")
data(txp_example_model, package = "toxpiR")
## Calculate scores for single model; returns TxpResult object
res <- txpCalculateScores(model = txp_example_model,
input = txp_example_input,
id.var = "name")
## Calculate scores for list of models; returns TxpResultList object
txpCalculateScores(model = TxpModelList(m1 = txp_example_model,
m2 = txp_example_model),
input = txp_example_input,
id.var = "name")
resLst <- txpCalculateScores(model = list(m1 = txp_example_model,
m2 = txp_example_model),
input = txp_example_input,
id.var = "name")
[Package toxpiR version 1.2.1 Index]