Type: | Package |
Title: | Clinical Utility Tools to Analyze a Predictive Model |
Version: | 0.1.0 |
Description: | Package to analyze the clinical utility of a biomarker. It provides the clinical utility curve, clinical utility table, efficacy of a biomarker, clinical efficacy curve and tests to compare efficacy between markers. |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.1 |
NeedsCompilation: | no |
Packaged: | 2025-02-07 14:31:07 UTC; luses |
Author: | Maria Escorihuela [aut], Luis Mariano Esteban [aut, cre], Gerardo Sanz [aut], Angel Borque [aut] |
Maintainer: | Luis Mariano Esteban <lmeste@unizar.es> |
Repository: | CRAN |
Date/Publication: | 2025-02-07 18:40:02 UTC |
Plot the clinical utility of a biomarker
Description
The clinical utility plot shows two magnitudes, the number of events missclassfied below a cut off point and the saved treatments. In the X axis we can see the different cut off points and in the Y axis the magnitudes above defined.
Usage
CUC_plot(Prob,yt)
Arguments
Prob |
A vector with the event probability values provided by the biomarker |
yt |
A vector with the actual event values |
Details
Prob must be a numeric vector with values between 0 and 1 and yt a numeric vector with dichotomic values 0/1
Value
The function returns the clinical utility curve
Author(s)
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
Examples
###We generate a marker to serve as an example and plot the CUC curve
Prob<-c(rnorm(1000,0.4,0.1),rnorm(1000,0.6,0.05))
yt<-rep(c(0,1),c(1000,1000))
CUC_plot(Prob,yt)
Clinical utility tools to analyze a predictive model
Description
Efficacy of a biomarker defined by the treatment saved below a cut-off point minus the missclasified events.
Usage
CUC_table(Th,Prob,yt)
Arguments
Th |
The vector of cutoff points used to estimate efficacy at those points. |
Prob |
A vector with the event probability values provided by the biomarker. |
yt |
A vector with the actual event values |
Details
Prob must be a numeric vector with values between 0 and 1, yt a numeric vector with dichotomic values 0/1 and z a numeric value between 0 and 100
Value
The returned object contains the following components:
CUC_table |
A data frame with three columns, the threshold points, the rate of missing events and the rate of avoided treatments |
Author(s)
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
Examples
###We generate a marker to serve as an example
Prob<-c(rnorm(1000,0.4,0.1),rnorm(1000,0.5,0.05))
yt<-rep(c(0,1),c(1000,1000))
#We choose a grid of threshold points.
Th<-seq(1,100)
#Estimte the Clinical utility table
CUC_table(Th, Prob, yt)
Estimate the efficacy of a biomarker
Description
The efficacy of a biomarker is defined by the treatment saved below a cut-off point minus the missclasified events.
Usage
Efficacy(Prob,yt,z)
Arguments
Prob |
A vector with the event probability values provided by the biomarker |
yt |
A vector with the actual event values |
z |
The misclassification rate at which the effectiveness of the marker will be estimated. |
Details
Prob must be a numeric vector with values between 0 and 1, yt a numeric vector with dichotomic values 0/1 and z a numeric value between 0 and 100
Value
The returned object contains the Efficacy of the biomarker Prob at a specific z rate of missclasified events
Efficacy |
Efficacy of the biomarker Prob at a specific z rate of missclasified events |
Author(s)
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
Examples
###We generate a marker to serve as an example
Prob<-c(rnorm(10000,0.4,0.1),rnorm(10000,0.5,0.05))
yt<-rep(c(0,1),c(10000,10000))
#We choose a rate of 10% for misclassified events.
Efficacy(Prob=Prob,yt=yt,z=10)
Efficacy curve for a predictive model/biomarker
Description
The curve plot the efficacy of a predictive model for different missclassfication event rates
Usage
Efficacy_curve(Prob,yt)
Arguments
Prob |
A vector with the event probability values provided by the biomarker |
yt |
A vector with the actual event values |
Details
Prob must be a numeric vector with values between 0 and 1, yt a numeric vector with dichotomic values 0/1 and z a numeric value between 0 and 100
Value
The returned fit object of Efficacy_curve contains the plot of the Efficacy curve.
EfficacyCurve |
Plot of the Efficacy of the biomarker Prob at different rates of missclasified events |
Author(s)
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
Examples
###We generate a marker to serve as an example and plot the curve
Prob<-c(rnorm(1000,0.4,0.1),rnorm(1000,0.5,0.05))
yt<-rep(c(0,1),c(1000,1000))
Efficacy_curve(Prob=Prob,yt=yt)
Test to compare efficacy of two models for a percentage of misclassified events
Description
Test to compare the efficacy of two markers for paired or unpaired cases
Usage
Efficacy_test( paired, Prob1,Prob2,yt1,yt2,z)
Arguments
paired |
if sample is paired 1 else 0 |
Prob1 |
A vector with the event probability values provided by the biomarker 1 |
yt1 |
A vector with the actual event values for the biomarker 1 |
Prob2 |
A vector with the event probability values provided by the biomarker 2 |
yt2 |
A vector with the actual event values for the biomarker 2 |
z |
The misclassification rate at which the effectiveness of the marker will be estimated. |
Details
Prob1 and Prob2 must be numeric vectors with values between 0 and 1, yt1 and yt2 numeric vectors with dichotomic values 0/1 and z a numeric value between 0 and 100. in a case of a paired comparison, yt1 and yt2 must be the same vector.
Value
The returned results of a test.
Efficacy_test |
It gives the result of the comparison test between markers in terms of efficacy |
Author(s)
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
Examples
###We generate a marker to serve as an example
Prob1<-c(rnorm(10000,0.4,0.1),rnorm(10000,0.5,0.05))
Prob2<-c(rnorm(10000,0.4,0.1),rnorm(10000,0.5,0.05))
yt1<-rep(c(0,1),c(10000,10000))
yt2<-rep(c(0,1),c(10000,10000))
#We choose a rate of 10% for misclassified events.
##For a paired test
Efficacy_test(paired=1,Prob1,Prob2,yt1,yt2,z=10)
##For a unpaired test
Efficacy_test(paired=0,Prob1,Prob2,yt1,yt2,z=10)