calculateCutoffs {TCPMOR} | R Documentation |
Calculate data filtering results and two cutoffs for given sensitivity and specificity threshold
Description
Calculate data filtering results and two cutoffs for given sensitivity and specificity threshold
Usage
calculateCutoffs(dataC, seThreshold = 0.1, spThreshold = 0.1)
Arguments
dataC |
Data frame containing columns: se, sp, age, y0, OR, y |
seThreshold |
Sensitivity threshold |
spThreshold |
Specificity threshold |
Value
A list with two elements: filteredData(the filtered dataset) and cutoffs(the calculated two cutoffs)
Examples
# Generate simulated data dataC
dataC <- createData(200)
# Fit the semi-parametric model
spm.fit <- fitSemiParamModel(dataC)
# Find two cut-off points
dataC <- findCutoffs(spm.fit, dataC)
# Output the two cut-off points after limiting sensitivity se and specificity sp
result <- calculateCutoffs(dataC)
cutoffs <- result$cutoffs
dataC2 <- result$filteredData
print(cutoffs)
[Package TCPMOR version 1.0 Index]