Description Usage Arguments Details Value Examples
Estimates a sparse continuous time Lyapunov parametrization of a covariance matrix using a lasso (L1) penalty.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
Sigma |
covariance matrix |
B |
initial B matrix |
C |
diagonal of initial C matrix |
C0 |
diagonal of penalization matrix |
loss |
one of "loglik" (default) or "frobenius" |
eps |
convergence threshold |
alpha |
parameter line search |
maxIter |
maximum number of iterations |
lambda |
penalization coefficient for B |
lambdac |
penalization coefficient for C |
job |
integer 0,1,10 or 11 |
lambdas |
sequence of lambda |
... |
additional arguments passed to |
gclm
performs proximal gradient descent for the optimization problem
argmin L(Σ(B,C)) + λ ρ(B) + λ_C ||C - C0||_F^2
subject to B stable and C diagonal, where ρ(B) is the l1 norm of the off-diagonal element of B.
gclm.path
simply calls iteratively gclm
with different lambda
values. Warm start is used, that
is in the i-th call to gclm
the B
and C
matrices are initialized as the one obtained in the (i-1)th
call.
for gclm
: a list with the result of the optimization
for gclm.path
: a list of the same length of
lambdas
with the results of the optimization for
the different lambda
values
1 2 3 4 5 6 7 8 9 10 11 | x <- matrix(rnorm(50*20),ncol=20)
S <- cov(x)
## l1 penalized log-likelihood
res <- gclm(S, eps = 0, lambda = 0.1, lambdac = 0.01)
## l1 penalized log-likelihood with fixed C
res <- gclm(S, eps = 0, lambda = 0.1, lambdac = -1)
## l1 penalized frobenius loss
res <- gclm(S, eps = 0, lambda = 0.1, loss = "frobenius")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.