View source: R/dantzig.delta.R
dantzig.delta | R Documentation |
The Dantzig selector (DS) finds a solution for the model parameters
of a linear model, beta
using linear programming. For a given delta
,
DS minimizes the L_1-norm (sum of absolute values) of beta
subject to the constraint
that max(|t(X)(y-X * beta)|) <= delta
.
dantzig.delta(X, y, delta, plot = FALSE)
X |
a design matrix. |
y |
a vector of responses. |
delta |
a vector with the values of |
plot |
a boolean value of either TRUE or FALSE with TRUE indicating that the profile plot should be drawn. |
A matrix of the estimated values of beta
with each
row corresponding to a particular value of delta
.
Cand\'es, E. and Tao, T. (2007). The Dantzig selector: Statistical estimation when p is much larger than n. Annals of Statistics 35 (6), 2313–2351.
Phoa, F. K., Pan, Y. H. and Xu, H. (2009). Analysis of supersaturated designs via the Dantzig selector. Journal of Statistical Planning and Inference 139 (7), 2362–2372.
GDS_givencols
, GDSARM
data(dataHamadaWu) X = dataHamadaWu[,-8] Y = dataHamadaWu[,8] #scale and center X and y scaleX = base::scale(X, center= TRUE, scale = TRUE) scaleY = base::scale(Y, center= TRUE, scale = FALSE) maxDelta = max(abs(t(scaleX)%*%matrix(scaleY, ncol=1))) # Dantzig Selector on 4 equally spaced delta values between 0 and maxDelta dantzig.delta(scaleX, scaleY, delta = seq(0,maxDelta,length.out=4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.