Learn R Programming

DMR (version 2.0)

roc: Measures of Performance

Description

roc is used for calculating measures of performance such as sensitivity and specificity when the true and predicted models can be described using linear hypotheses.

Usage

roc(Y0, X0)

Arguments

Y0
matrix of linear constraints for the true model's parameters
X0
matrix of linear constraints for the predicted model's parameters

Value

a list including elements
sensitivity
proportion of the dimension of intersection of linear spaces of parameters for the true and predicted models to the dimension of linear space of parameters for the true model
specificity
proportion of the dimension of intersection of linear spaces that are complements of linear spaces of parameters for the true and predicted models to the dimension of linear space which is a complement of the linaer space of parameters for the true model

See Also

DMR, stepDMR, DMR4glm, plot_bf

Examples

Run this code
v1 <- factor(rep(1:3, times = 16))
set.seed(1)
x1 <- rnorm(48)
set.seed(2)
y <- x1 + rnorm(48, 0, 3)
m <- lm(y ~ v1 + x1)
out <- DMR(m) 
x0 <- out$Best$Hypotheses
y0 <- matrix(c(0, 0, -1, 1, 1, 0, 0, 0), 2, 4)
measures <- roc(y0, x0)
sen <- measures$sensitivity 
spe <- measures$specificity

Run the code above in your browser using DataLab