Learn R Programming

ROCnReg (version 1.0-8)

cROCData: Selects an adequate set of points from a data set for obtaining predictions.

Description

Selects an adequate set of points from a data set for obtaining predictions

Usage

cROCData(data, names.cov, group)

Value

A data frame containing selected values of all needed covariates. For those that are continuous, 30 different values are selected.

Arguments

data

Data set from which the new set of covariate values is obtained.

names.cov

Character vector with the names of the covariates to be included in the new data set.

group

A character string with the name of the variable in the original data set that distinguishes healthy from diseased individuals.

See Also

AROC.bnp, cROC.bnp, cROC.sp, cROC.kernel, compute.threshold.cROC or compute.threshold.AROC.

Examples

Run this code
library(ROCnReg)
data(psa)
# Select the last measurement
newpsa <- psa[!duplicated(psa$id, fromLast = TRUE),]

# Log-transform the biomarker
newpsa$l_marker1 <- log(newpsa$marker1)

newdf <- cROCData(newpsa, "age", "status")

summary(newdf)

Run the code above in your browser using DataLab