Running 'ex-clusterGroupBound.R' [161s]
  Running 'ex-lasso.proj.R' [163s]
  Running 'ex-plotClusterGroupBound.R' [8s]
  Running 'groupTsts.R' [2s]
  Running 'test-lasso.R' [10s]
  Running 'test-multisplit.R' [25s]
  Running 'test-ridge.R' [5s]
  Running 'test-stability.R' [4s]
Running the tests in 'tests/ex-clusterGroupBound.R' failed.
Complete output:
  > stopifnot(require(hdi))
  Loading required package: hdi
  Loading required package: scalreg
  Loading required package: lars
  Loaded lars 1.3
  
  > 
  > ## this is the example code of the help file of clusterGroupBound
  > 
  > ## Create a regression problem with correlated design (n = 10, p = 3):
  > ## a block of size 2 and a block of size 1, within-block correlation is 0.99
  > 
  > set.seed(29)
  > p   <- 3
  > n   <- 10
  > 
  > Sigma <- diag(p)
  > Sigma[1,2] <- Sigma[2,1] <- 0.99
  > 
  > x <- matrix(rnorm(n * p), nrow = n) %*% chol(Sigma)
  > 
  > ## Create response with active variable 1
  > beta    <- rep(0, p)
  > beta[1] <- 5
  > 
  > y  <- as.numeric(x %*% beta + rnorm(n))
  > 
  > out <- clusterGroupBound(x, y, nsplit = 4) ## use larger value for nsplit!
  
    5    3 member(s)	 with lower bound 3.642297
    3    1 member(s)	 with lower bound 0
  
    4    2 member(s)	 with lower bound 3.057924
    1    1 member(s)	 with lower bound 0
  
    2    1 member(s)	 with lower bound 0
  
  
  > 
  > ## Plot and print the hierarchical group-test
  > plot(out)
  > print(out)
  lower l1-norm group bounds in a hierarchical clustering:
  - lower bound on l1-norm of *all* regression coefficients: 3.642
  - only 1 significant non-overlapping cluster with 2 members
   > out$members
  [[1]]
  [1] 1
  
  [[2]]
  [1] 2
  
  [[3]]
  [1] 3
  
  [[4]]
  [1] 1 2
  
  [[5]]
  [1] 1 2 3
  
  > out$lowerBound
  [1] 0.000000 0.000000 0.000000 3.057924 3.642297
  > 
  > proc.time()
     user  system elapsed 
     3.65    2.92    6.54 
Running the tests in 'tests/ex-lasso.proj.R' failed.
Complete output:
  > stopifnot(require(hdi))
  Loading required package: hdi
  Loading required package: scalreg
  Loading required package: lars
  Loaded lars 1.3
  
  > 
  > ## this is the example code of the help file of lasso.proj
  > 
  > x <- matrix(rnorm(100 * 10), nrow = 100, ncol = 10)
  > y <- x[,1] + x[,2] + rnorm(100)
  > fit.lasso <- lasso.proj(x, y)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  > which(fit.lasso$pval.corr < 0.05) # typically: '1' and '2' and no other
  [1] 1 2
  > 
  > ## Group-wise testing of the first two coefficients
  > fit.lasso$groupTest(1:2)
  [1] 2.710097e-19
  > 
  > ## Hierarchical testing using distance matrix based on
  > ## correlation matrix
  > out.clust <- fit.lasso$clusterGroupTest()
  > plot(out.clust)
  > 
  > ## Fit the lasso projection method without doing the preparations
  > ## for group testing (saves time and memory)
  > fit.lasso.faster <- lasso.proj(x, y, suppress.grouptesting = TRUE)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  > 
  > ## Use the scaled lasso for the initial estimate
  > fit.lasso.scaled <- lasso.proj(x, y, betainit = "scaled lasso")
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  > which(fit.lasso.scaled$pval.corr < 0.05)
  [1] 1 2
  > 
  > ## Use a robust estimate for the standard error
  > fit.lasso.robust <- lasso.proj(x, y, robust = TRUE)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  > which(fit.lasso.robust$pval.corr < 0.05)
  [1] 1 2
  > 
  > ## Perform the Z&Z version of the lasso projection method
  > fit.lasso <- lasso.proj(x, y, do.ZnZ = TRUE)
  Nodewise regressions will be computed as no argument Z was provided.
  You can store Z to avoid the majority of the computation next time around.
  Z only depends on the design matrix x.
  > 
  > which(fit.lasso$pval.corr < 0.05) # typically: '1' and '2' and no other
  [1] 1 2
  > 
  > proc.time()
     user  system elapsed 
     4.95    0.29    5.23