Learn R Programming

TCPMOR (version 1.0)

calculateCutoffs: 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)

Value

A list with two elements: filteredData(the filtered dataset) and cutoffs(the calculated two cutoffs)

Arguments

dataC

Data frame containing columns: se, sp, age, y0, OR, y

seThreshold

Sensitivity threshold

spThreshold

Specificity threshold

Examples

Run this code
# 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)

Run the code above in your browser using DataLab