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 sglasso object;

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 K(ψ), the log-likelihood function of the RCON(V, E) model is equal, up to a constant, to the following expression

l(ψ) = N/2[log det K(ψ) - tr{S K(ψ)}],

where S = N^{-1}∑_{i=1}^N X_i X_i', N is the sample size and X_i is the ith observed p-dimensional vector. Denoted with hat{ψ} = (hat{η}', hat{θ}')' the sglasso estimates, straightforward algebra shows that

l(hat{ψ}) = N/2[log det K(hat{ψ}) - p + ρ∑_{m=1}^S w_m |hat{θ_m|}],

where ρ 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)

[Package sglasso version 1.2.3 Index]