biomarker: biomarker

View source: R/biomarker.R

biomarkerR Documentation

biomarker

Description

The function for identification of biomakers and outlier diagnostics as described in paper "Robust biomarker identification in a two-class problem based on pairwise log-ratios"

Usage

biomarker(
  x,
  cut = qnorm(0.975, 0, 1),
  g1,
  g2,
  type = "tau",
  diag = TRUE,
  plot = FALSE,
  diag.plot = FALSE
)

## S3 method for class 'biomarker'
plot(x, cut = qnorm(0.975, 0, 1), type = "Vstar", ...)

## S3 method for class 'biomarker'
print(x, ...)

## S3 method for class 'biomarker'
summary(object, ...)

Arguments

x

data frame

cut

cut-off value, initialy set as 0.975 quantile of standard normal distribution

g1

vector with locations of observations of group 1

g2

vector with locations of observations of group 2

type

type of estimation of the variation matrix. Possible values are "sd", "mad" and "tau", representing Standard deviation, Median absolute deviation and Tau estimator of scale

diag

logical, indicating wheter outlier diagnostic should be computed

plot

logical, indicating wheter Vstar values should be plotted

diag.plot

logical, indicating wheter outlier diagnostic plot should be made

...

further arguments can be passed through

object

object of class biomarker

Details

Robust biomarker identification and outlier diagnostics

The method computes variation matrices separately with observations from both groups and also together with all observations. Then, V statistics is then computed and normalized. The variables, for which according V* values are bigger that the cut-off value are considered as biomarkers.

Value

The function returns object of type "biomarker". Functions print, plot and summary are available.

biom.ident

List of V, Vstar, biomarkers

V

Values of V statistics

Vstar

Normalizes values of V statistics (V^* values))

biomarkers

Logical value, indicating if certain variable was identified as biomarker

diag

Outlier diagnostics (returned only if diag=TRUE)

Author(s)

Jan Walach

See Also

plot.biomarker

Examples

# Data simulation
set.seed(4523)
n <- 40; p <- 50
r <- runif(p, min = 1, max = 10)
conc <- runif(p, min = 0, max = 1)*5+matrix(1,p,1)*5
a <- conc*r
S <- rnorm(n,0,0.3) %*% t(rep(1,p))
B <- matrix(rnorm(n*p,0,0.8),n,p)
R <- rep(1,n) %*% t(r)
M <- matrix(rnorm(n*p,0,0.021),n,p)
# Fifth observation is an outlier
M[5,] <- M[5,]*3 + sample(c(0.5,-0.5),replace=TRUE,p)
C <- rep(1,n) %*% t(conc)
C[1:20,c(2,15,28,40)] <- C[1:20,c(2,15,28,40)]+matrix(1,20,4)*1.8
X <- (1-S)*(C*R+B)*exp(M)
# Biomarker identification
b <- biomarker(X, g1 = 1:20, g2 = 21:40, type = "tau")

robCompositions documentation built on Aug. 25, 2023, 5:13 p.m.