Last updated: 2022-09-28

Checks: 6 1

Knit directory: lglasso_data_analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20220927) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 4d8e172. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/figure1.Rmd
    Untracked:  analysis/netwrok_real_data.Rmd
    Untracked:  analysis/table1.Rmd
    Untracked:  analysis/tau1.rd
    Untracked:  code/real_bootstrap.R
    Untracked:  code/real_estimation.R
    Untracked:  code/real_estimation1.R
    Untracked:  code/real_network_identification.R
    Untracked:  code/real_permutation.R
    Untracked:  code/real_phylogenetic_tree.R
    Untracked:  code/real_testing.R
    Untracked:  code/real_tree_network_correlation_bootstrap.R
    Untracked:  code/simulation_functions.R
    Untracked:  data/ddata.csv
    Untracked:  data/subject=15_time=20_coef=0.223_nodes=80.Rd
    Untracked:  data/subject=15_time=20_coef=0.916_nodes=80.Rd
    Untracked:  data/subject=15_time=20_coef=2.302_nodes=80.Rd
    Untracked:  data/subject=15_time=40_coef=0.223_nodes=80.Rd
    Untracked:  data/subject=15_time=40_coef=0.916_nodes=80.Rd
    Untracked:  data/subject=15_time=40_coef=2.302_nodes=80.Rd
    Untracked:  data/subject=30_time=20_coef=0.223_nodes=80.Rd
    Untracked:  data/subject=30_time=20_coef=0.916_nodes=80.Rd
    Untracked:  data/subject=30_time=20_coef=2.302_nodes=80.Rd
    Untracked:  data/subject=30_time=40_coef=0.223_nodes=80.Rd
    Untracked:  data/subject=30_time=40_coef=0.916_nodes=80.Rd
    Untracked:  data/subject=30_time=40_coef=2.302_nodes=80.Rd
    Untracked:  tau1.rd

Unstaged changes:
    Modified:   analysis/index.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


library("lglasso")

Read into the data

Click me
data=read.csv(file = "./data/ddata.csv")[,-1]

Estimate networks for a given sequence of tuning parameters

Click me
bic1=c()
rho=seq(0.01,1,length=5)
nu=10
network1=vector("list",length = length(rho))
for (j in 1:length(rho)){
result1=lglasso(data = data, rho = rho[j],heter=T)
network1[[j]]=result1$network
bb1=-2*result1$ll +0.5*nu*length(which(result1$omega!=0))*log(nrow(data))
bic1=c(bic1,bb1)
}

Select the network based on EBIC

Click me
index=which.min(bic1)
estnetwork=network1[[index]]

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] lglasso_0.1.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9       rstudioapi_0.13  knitr_1.39       magrittr_2.0.3  
 [5] workflowr_1.7.0  R6_2.5.1         rlang_1.0.4      fastmap_1.1.0   
 [9] fansi_1.0.3      stringr_1.4.0    tools_4.1.2      xfun_0.31       
[13] utf8_1.2.2       cli_3.3.0        git2r_0.30.1     jquerylib_0.1.4 
[17] htmltools_0.5.2  ellipsis_0.3.2   rprojroot_2.0.3  yaml_2.3.5      
[21] digest_0.6.29    tibble_3.1.7     lifecycle_1.0.1  later_1.3.0     
[25] sass_0.4.2       vctrs_0.4.1      promises_1.2.0.1 fs_1.5.2        
[29] cachem_1.0.6     glue_1.6.2       evaluate_0.15    rmarkdown_2.14  
[33] stringi_1.7.6    bslib_0.4.0      compiler_4.1.2   pillar_1.8.0    
[37] jsonlite_1.8.0   httpuv_1.6.5     glasso_1.11      pkgconfig_2.0.3