Description Usage Arguments Value See Also Examples
See hsm
for the problem that is solved. If lamlist
is not provided, a grid of lam values will be constructed starting at
lammax
, the smallest value of lam for which the solution is completely
sparse.
1 2 3 |
y |
Length- |
nlam |
Number of lam values to include in grid. Default value is 20. |
flmin |
Ratio between the smallest lam and largest lam in grid. Default value is 0.01. Increasing its value will give more sparse solutions. |
lamlist |
A grid of lam values to use. If this is |
w |
Length- |
map |
Matrix of |
var |
Length- |
assign |
Matrix of |
w.assign |
List of length |
get.penalval |
If |
tol |
Tolerance level used in BCD. Convergence is assumed when no parameter of interest in each path graph changes by more than tol in BCD. |
maxiter |
Upperbound of the number of iterations that BCD to perform. |
Returns a sequence of estimates of the solution to the proximal operator of the latent group Lasso. The returned solutions are exact ones if the DAG is a directed path graph.
lamlist |
Grid of lam values used. |
beta.m |
A |
penalval.m |
Length- |
assign |
Value of |
w.assign |
Value of |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # The following example appears in Figure 7 of Yan & Bien (2015).
# Generate map defining DAG.
map <- matrix(0, ncol=2, nrow=8)
map[1, ] <- c(1,2)
map[2, ] <- c(2,7)
map[3, ] <- c(3,4)
map[4, ] <- c(4,6)
map[5, ] <- c(6,7)
map[6, ] <- c(6,8)
map[7, ] <- c(3,5)
map[8, ] <- c(5,6)
# Assume one parameter per node.
# Let parameter and node share the same index.
var <- as.list(1:8)
set.seed(100)
y <- rnorm(8)
result <- hsm(y=y, lam=0.5, map=map, var=var, get.penalval=TRUE)
result.path <- hsm.path(y=y, map=map, var=var, get.penalval=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.