# 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)
# Calculate the two cut-off points after limiting sensitivity se and specificity sp
result <- calculateCutoffs(dataC)
cutoffs <- result$cutoffs
dataC2 <- result$filteredData
# Discretize age variable based on the two cutoffs
dataC2 <- discretizeAge(dataC2, cutoffs)
Run the code above in your browser using DataLab