get_crit_nopenalty: Minimized loss for unpenalized restricted asymmetric models.

Description Usage Arguments Details Value Examples

View source: R/genscore.R

Description

Analytic solution of the minimized loss for an unpenalized asymmetric model restricted to a given support. Does not work if symmetric == "symmetric".

Usage

1
2
3
4
5
6
get_crit_nopenalty(
  elts,
  exclude = NULL,
  exclude_eta = NULL,
  previous_res = NULL
)

Arguments

elts

A list, elements necessary for calculations returned by get_elts().

exclude

Optional. A p*p binary matrix or a p^2 binary vector, where 1 indicates the entry in K was estimated to 0 in the previous estimate. Default to NULL.

exclude_eta

Optional. A p-binary vector, similar to exclude. Default to NULL.

previous_res

Optional. A list, the returned list by get_results() run previously with another lambda value. Default to NULL.

Details

If previous_res is provided, exclude and exclude_eta must be NULL or be consistent with the estimated support in previous_res. If previous_res and exclude are both NULL, assume all edges are present. The same applies to the non-profiled non-centered case when previous_res and exclude_eta are both NULL.

Value

A number, the refitted loss.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 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{get_crit_nopenalty()}) 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)
get_crit_nopenalty(elts_gauss_np, previous_res=res_nc_np)

genscore documentation built on April 28, 2020, 1:06 a.m.