Description Usage Arguments Value Examples
View source: R/OriginalFunctions.R
This function gives you the optimal nonparametric tripartite rule that minimizes the min-λ rules.
1 | Opt.nonpar.rule(Z, S, phi, lambda)
|
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=λ*I(FN)+(1-λ)*I(FP). |
Optimal nonparametric rule and its associated misclassification rates (FNR, FPR), optimal lambda risk, and total misclassification rate (TMR).
1 2 3 4 5 6 | 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.nonpar.rule( Z, S, phi, lambda)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.