CV.TGST: Cross Validation

Description Usage Arguments Value Examples

View source: R/CV.TGST.R

Description

This function allows you to compute the average of misdiagnoses rate for viral failure and the optimal risk under min-λ rules from K-fold cross-validation.

Usage

1
CV.TGST(Obj, lambda, K = 10)

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).

K

Number of folds in cross validation. The default is 10.

Value

Cross-validation results.

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
Obj = TGST(Z, S, phi, method="nonpar")
lambda = 0.8
CV.TGST(Obj, lambda, K=10)

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