Learn R Programming

TGST (version 1.0)

Opt.semipar.rule: Optimal Semiparametric Rule

Description

This function gives you the optimal semiparametric tripartite rule that minimizes the min-\(\lambda\) rules.

Usage

Opt.semipar.rule(Z, S, phi, lambda)

Arguments

Z

True disease status (No disease / treatment success coded as Z=0, diseased / treatment failure coded as Z=1).

S

Risk score.

phi

Percentage of patients taking viral load test.

lambda

A user-specified weight that reflects relative loss for the two types of misdiagnoses, taking value in \([0,1]\). \(Loss=\lambda*I(FN)+(1-\lambda)*I(FP)\).

Value

Optimal semiparametric rule and its associated misclassification rates (FNR, FPR), optimal lambda risk, and total misclassification rate (TMR).

Examples

Run this code
# NOT RUN {
d = Simdata
Z = d$Z # True Disease Status
S = d$S # Risk Score
phi = 0.1 #10% of patients taking viral load test
lambda = 0.5
Opt.semipar.rule( Z, S, phi, lambda)
# }

Run the code above in your browser using DataLab