Skip to contents
#remotes::install_github("PengSU517/robcovsel")
#remotes::install_github("PengSU517/shootings") !!!!!!!!!!!!!!
#This shootings package is not my original work. The functions in this package were forked from https://github.com/ineswilms/sparse-shooting-S. I constructed a package of those functions to make them more convenient to use.
library(robcovsel)
#library(shootings)

Data generation

gen = genevar(p = 10, e = 0.1)
x = gen$x
y = gen$y

test

system.time({fit1 = covlasso(x,y,cor.method = "gaussrank",scale.method = "qn")})
#>    user  system elapsed 
#>   0.053   0.000   0.054
fit1$betahat
#>       0        1         2         3        4          5         6          7
#>  [1,] 0 0.000000 0.0000000 0.0000000 0.000000 0.00000000 0.3891072  0.4796295
#>  [2,] 0 1.322444 1.7643587 1.7927558 1.815996 1.82674863 1.6585867  1.5881774
#>  [3,] 0 0.000000 0.7668523 1.0622965 1.505906 1.54409629 1.8317578  1.8525377
#>  [4,] 0 0.000000 0.0000000 0.7117919 1.242444 1.24696873 1.4155940  1.5031759
#>  [5,] 0 0.000000 0.0000000 0.0000000 1.265540 1.26026568 1.1714536  1.2667594
#>  [6,] 0 0.000000 0.0000000 0.0000000 0.000000 0.00000000 0.0000000  0.0000000
#>  [7,] 0 0.000000 0.0000000 0.0000000 0.000000 0.00000000 0.0000000  0.0000000
#>  [8,] 0 0.000000 0.0000000 0.0000000 0.000000 0.00000000 0.0000000 -0.1708010
#>  [9,] 0 0.000000 0.0000000 0.0000000 0.000000 0.07579378 0.3980725  0.4907202
#> [10,] 0 0.000000 0.0000000 0.0000000 0.000000 0.00000000 0.0000000  0.0000000
#>                8           9          10
#>  [1,]  0.5330465  0.54579549  0.54692671
#>  [2,]  1.5559290  1.56521806  1.58151433
#>  [3,]  1.8733534  1.87579937  1.87630203
#>  [4,]  1.5350429  1.52576450  1.51007617
#>  [5,]  1.2858958  1.29775066  1.31948672
#>  [6,]  0.1643652  0.21753474  0.22795925
#>  [7,]  0.0000000  0.00000000  0.08031254
#>  [8,] -0.3626785 -0.44723991 -0.52152406
#>  [9,]  0.5716900  0.59486962  0.61188036
#> [10,]  0.0000000  0.07243567  0.10115282
#> attr(,"scaled:scale")
#>  [1] 1 1 1 1 1 1 1 1 1 1