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 the parameter vector of the structured concentration matrix
, the log-likelihood function of the RCON(V, E) model is equal, up to a constant, to the following expression
where ,
is the sample size and
is the
th observed
-dimensional vector. Denoted with
the sglasso estimates, straightforward algebra shows that
where is the tuning parameter and
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)