roc: Measures of Performance

Description Usage Arguments Value Author(s) See Also Examples

View source: R/roc.r

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

1
 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

Author(s)

Piotr Pokarowski, Agnieszka Prochenka, Aleksandra Maj

See Also

DMR, stepDMR, DMR4glm, plot_bf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

DMR documentation built on May 30, 2017, 6:25 a.m.