Title: | Clinical Utility Tools to Analyze a Predictive Model |
---|---|
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. |
Authors: | Maria Escorihuela [aut], Luis Mariano Esteban [aut, cre], Gerardo Sanz [aut], Angel Borque [aut] |
Maintainer: | Luis Mariano Esteban <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-03-10 04:48:39 UTC |
Source: | https://github.com/cran/CUtools |
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.
CUC_plot(Prob,yt)
CUC_plot(Prob,yt)
Prob |
A vector with the event probability values provided by the biomarker |
yt |
A vector with the actual event values |
Prob must be a numeric vector with values between 0 and 1 and yt a numeric vector with dichotomic values 0/1
The function returns the clinical utility curve
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
###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)
###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)
Efficacy of a biomarker defined by the treatment saved below a cut-off point minus the missclasified events.
CUC_table(Th,Prob,yt)
CUC_table(Th,Prob,yt)
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 |
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
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 |
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
###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)
###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)
The efficacy of a biomarker is defined by the treatment saved below a cut-off point minus the missclasified events.
Efficacy(Prob,yt,z)
Efficacy(Prob,yt,z)
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. |
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
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 |
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
###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)
###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)
The curve plot the efficacy of a predictive model for different missclassfication event rates
Efficacy_curve(Prob,yt)
Efficacy_curve(Prob,yt)
Prob |
A vector with the event probability values provided by the biomarker |
yt |
A vector with the actual event values |
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
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 |
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
###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)
###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 the efficacy of two markers for paired or unpaired cases
Efficacy_test( paired, Prob1,Prob2,yt1,yt2,z)
Efficacy_test( paired, Prob1,Prob2,yt1,yt2,z)
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. |
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.
The returned results of a test.
Efficacy_test |
It gives the result of the comparison test between markers in terms of efficacy |
Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque
###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)
###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)