BIC_calc | R Documentation |
Function that takes the resulting values of the estimated model as input, to compute BIC
BIC_calc(X, b.tld, y, n)
X |
The covariates' matrix |
b.tld |
The estimated sparse-beta |
y |
The response variable |
n |
The number of observation |
Returns the BIC value calculated for a single value of the tuning parameter.
p <- 10 n <- 100 X <- cbind(1, matrix(rnorm(n * p), n , p)) b.s <- c(1, rep(0, p)) b.s[sample(2:p, 3)] <- 1 y <- drop(crossprod(t(X), b.s)) out <- cdfPen(X = X, y = y) (bic <- BIC_cdfpen(out)) plot(out$lmb, bic, "s")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.