Description Usage Arguments Value Author(s) References Examples
Generate random sample with different proportion of outliers and leverage points
1 | sample.sim(n, p, sig, a1, a2, nn = TRUE, intercept = FALSE)
|
n |
number of observations. |
p |
number of independent variables (predictors). |
sig |
variance of dependent variable. |
a1 |
proportion of outliers. |
a2 |
proportion of leverage points in outliers. |
nn |
whether coefficients are non-negative, default TRUE. |
intercept |
whether intercept is included in model, default TRUE. |
y: vector of dependent variable.
x: matrix of predictors with n rows and p columns.
loc: index of added outliers.
beta: vector of coefficients.
Yuning Hao, Ming Yan, Blake R. Heath, Yu L. Lei and Yuying Xie
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>
1 2 | library(FARDEEP)
samp = sample.sim(n = 500, p = 20, sig = 1, a1 = 0.1, a2 = 0.2, nn = TRUE, intercept = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.