OptimalRule: Optimal Tripartite Rule

Description Usage Arguments Value Examples

View source: R/OptimalRule.R

Description

OptimalRule is the main function of TGST and it gives you the optimal tripartite rule that minimizes the min-λ 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

1
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=λ*I(FN)+(1-λ)*I(FP).

Value

Optimal tripartite rule.

Examples

1
2
3
4
5
6
7
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)

yizhenxu/TVLT documentation built on Nov. 27, 2020, 2:37 a.m.