Learn R Programming

CUtools (version 0.1.0)

Efficacy_test: 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)

Value

The returned results of a test.

Efficacy_test

It gives the result of the comparison test between markers in terms of efficacy

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.

Author

Maria Escorihuela, Luis Mariano Esteban, Gerardo Sanz, Angel Borque

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.

Examples

Run this code
###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)

Run the code above in your browser using DataLab