alts {FARDEEP}R Documentation

Using the basic idea of least trimmed square to detect and remove outliers before estimating the coefficients. Adaptive least trimmed square.

Description

Using the basic idea of least trimmed square to detect and remove outliers before estimating the coefficients. Adaptive least trimmed square.

Usage

alts(x, y, alpha1 = 0.1, alpha2 = 1.5, k = 6, nn = TRUE,
  intercept = TRUE)

Arguments

x

input matrix of predictors with n rows and p columns.

y

input vector of dependent variable with length n.

alpha1

parameter used to adjust the upper bound of outliers. Take value from 0 to 1, default 0.1.

alpha2

parameter used to adjust the lower bound of outliers. Take value larger than 1, default 1.5.

k

parameter used to determine the boundary of outliers in the following step of algorithm. Take value from 1 to 10, default 6.

nn

whether coefficients are non-negative,default TRUE.

intercept

whether intercept is included in model, default TRUE.

Value

beta: estimation of coefficients.

number_outlier: number of outliers.

outlier_detect: index of detected outliers.

X.new: good observed points for independent variables.

Y.new: good observed points for dependent variables.

k: modified k (if the input value is not appropriate).

Author(s)

Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie

References

Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie. Fast and Robust Deconvolution of Tumor Infiltrating Lymphocyte from Expression Profiles using Least Trimmed Squares. <doi:10.1101/358366>

Examples

library(FARDEEP)
samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE)
result = alts(samp$x, samp$y, alpha1 = 0.1, alpha2 = 1.5, k = 6, nn = TRUE, intercept = TRUE)
coef = result$beta

[Package FARDEEP version 1.0.1 Index]