loglik {sglasso} | R Documentation |
Extract Log-Likelihood
Description
This function extracts the log-likelihood for the sequence of weighted l1-penalized RCON(V, E) models estimated by sglasso
function.
Usage
loglik(object, N = 2)
Arguments
object |
a fitted |
N |
sample size. Default value is 2 to remove the constant term in the log-likelihood function. See below for more details. |
Details
Denoted with \psi = (\eta',\theta')'
the parameter vector of the structured concentration matrix K(\psi)
, the log-likelihood function of the RCON(V, E) model is equal, up to a constant, to the following expression
\ell(\psi) = \frac{N}{2}[\log det K(\psi) - tr\{S K(\psi)\}],
where S = N^{-1}\sum_{i=1}^NX_iX_i^T
, N
is the sample size and X_i
is the i
th observed p
-dimensional vector. Denoted with \hat\psi = (\hat\eta',\hat\theta')'
the sglasso estimates, straightforward algebra shows that
\ell(\hat\psi) = \frac{N}{2}[\log det K(\hat\psi) - p + \rho\sum_{m=1}^S w_m|\hat\theta_m|],
where \rho
is the tuning parameter and w_m
are the weights used to define the weighted l1-norm.
Value
loglik
returns a vector containing the log-likelihood computed for the sequence of weighted l1-penalized RCON(V, E).
Author(s)
Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it
See Also
summary.sglasso
method and sglasso
function.
Examples
N <- 100
p <- 5
X <- matrix(rnorm(N * p), N, p)
S <- crossprod(X) / N
mask <- outer(1:p, 1:p, function(i, j) 0.5^abs(i-j))
out.sglasso_path <- sglasso(S, mask, nrho = 5, tol = 1.0e-13)
out.sglasso_path
loglik(out.sglasso_path, N = N)
rho <- out.sglasso_path$rho[3]
out.sglasso_single <- sglasso(S, mask, nrho = 1, min_rho = rho,
tol = 1.0e-13, algorithm = "ccm")
loglik(out.sglasso_single, N = N)