predict.dtComb {dtComb} | R Documentation |
Predict combination scores and labels for new data sets using the training model
Description
The predict.dtComb
is a function that generates predictions
for a new dataset of biomarkers using the parameters from the fitted model.
The function takes arguments newdata and model. The function's output is the
combination scores and labels of object type.
Usage
## S3 method for class 'dtComb'
predict(object, newdata = NULL, ...)
Arguments
object |
a |
newdata |
a |
... |
further arguments. Currently has no effect on the results. |
Value
A data.frame
predicted combination scores (or probabilities)
and labels
Author(s)
Serra Ilayda Yerlitas, Serra Bersan Gengec, Necla Kochan, Gozde Erturk Zararsiz, Selcuk Korkmaz, Gokmen Zararsiz
Examples
# call data
data(exampleData1)
# define the function parameters
markers <- exampleData1[, -1]
status <- factor(exampleData1$group, levels = c("not_needed", "needed"))
event <- "needed"
score1 <- linComb(
markers = markers, status = status, event = event,
method = "logistic", resample = "none",
standardize = "none", direction = "<", cutoff.method = "Youden"
)
comb.score1 <- predict(score1, markers)
score2 <- nonlinComb(
markers = markers, status = status, event = "needed", include.interact = TRUE,
method = "polyreg", resample = "repeatedcv", nfolds = 5,
nrepeats = 10, cutoff.method = "Youden", direction = "auto"
)
comb.score2 <- predict(score2, markers)
score3 <- mathComb(
markers = markers, status = status, event = event,
method = "distance", distance = "euclidean", direction = "auto",
standardize = "tScore", cutoff.method = "Youden"
)
comb.score3 <- predict(score3, markers)
[Package dtComb version 1.0.2 Index]