Learn R Programming

TGST (version 1.0)

OptimalRule: Optimal Tripartite Rule

Description

OptimalRule is the main function of TGST and it gives you the optimal tripartite rule that minimizes the min-\(\lambda\) risk based on the type of user selected approach. The function takes the risk score and true disease status from a training data set and returns the optimal tripartite rule under the specified proportion of patients able to take gold standard test.

Usage

OptimalRule(Obj, lambda)

Arguments

Obj

An object of class TGST.

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 tripartite rule.

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
Obj = TGST(Z, S, phi, method="nonpar")
OptimalRule(Obj, lambda)
# }

Run the code above in your browser using DataLab