BIC_calc {penalizedcdf}R Documentation

BIC calculator function

Description

Function that takes the resulting values of the estimated model as input, to compute BIC

Usage

BIC_calc(X,
         b.tld,
         y,
         n)

Arguments

X

The covariates' matrix

b.tld

The estimated sparse-beta

y

The response variable

n

The number of observation

Value

Returns the BIC value calculated for a single value of the tuning parameter.

Examples


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")

[Package penalizedcdf version 0.1.0 Index]