eBIC | R Documentation |
Calculates the eBIC score both with and without refitting an unpenalized model restricted to the estimated support.
eBIC(res, elts, BIC_refit = TRUE, gammas = c(0, 0.5, 1))
res |
A list of results returned by get_results(). |
elts |
A list, elements necessary for calculations returned by get_elts(). |
BIC_refit |
A boolean, whether to get the BIC scores by refitting an unpenalized model restricted to the estimated edges, with |
gammas |
Optional. A number of a vector of numbers. The |
A vector of length 2*length(gammas)
. The first length(gammas)
numbers are the eBIC scores without refitting for each gamma
value, and the rest are those with refitting if BIC_refit == TRUE
, or Inf
if BIC_refit == FALSE
.
# Examples are shown for Gaussian truncated to R+^p only. For other distributions
# on other types of domains, please refer to \code{gen()} or \code{get_elts()},
# as the way to call this function (\code{eBIC()}) is exactly the same in those cases.
n <- 50
p <- 30
domain <- make_domain("R+", p=p)
h_hp <- get_h_hp("min_pow", 1, 3)
mu <- rep(0, p)
K <- diag(p)
dm <- 1 + (1-1/(1+4*exp(1)*max(6*log(p)/n, sqrt(6*log(p)/n))))
x <- tmvtnorm::rtmvnorm(n, mean = mu, sigma = solve(K),
lower = rep(0, p), upper = rep(Inf, p), algorithm = "gibbs",
burn.in.samples = 100, thinning = 10)
elts_gauss_np <- get_elts(h_hp, x, setting="gaussian", domain=domain,
centered=FALSE, profiled=FALSE, diag=dm)
res_nc_np <- get_results(elts_gauss_np, symmetric="symmetric",
lambda1=0.35, lambda2=2, previous_res=NULL,
is_refit=FALSE)
eBIC(res_nc_np, elts_gauss_np, BIC_refit=TRUE, gammas=c(0,0.5,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.