comparegroups updated version 2 0
play

compareGroups updated: version 2.0 Isaac Subirana & Joan Vila - PowerPoint PPT Presentation

compareGroups updated: version 2.0 Isaac Subirana & Joan Vila & H ector Sanz & Judith Pe nafiel & Gavin Lucas & David Gim enez isubirana@imim.es , hsanz@imim.es & jvila@imim.es & jpenafiel@imim.es &


  1. compareGroups updated: version 2.0 Isaac Subirana & Joan Vila & H´ ector Sanz & Judith Pe˜ nafiel & Gavin Lucas & David Gim´ enez isubirana@imim.es , hsanz@imim.es & jvila@imim.es & jpenafiel@imim.es & gavin.lucas@cleargenetics.com RICAD Research on Inflammatory and Cardiovascular Disorders Program IMIM-Parc de Salut Mar, Barcelona userR! Albacete, July 10-12, 2013 Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 1 / 36

  2. Introduction Motivation Estruch R, Ros E, Salas-Salvad´ o J, Covas MI, Corella D, Ar´ os F, G´ omez-Gracia E, Ruiz-Guti´ errez V, Fiol M, Lapetra J, Lamuela-Raventos RM, Serra-Majem L, Pint´ o X, Basora J, Mu˜ noz MA, Sorl´ ı JV, Mart´ ınez JA, Mart´ ınez-Gonz´ alez MA; PREDIMED Study Investigators (2013). Primary prevention of cardiovascular disease with a Mediterranean diet. New England Journal of Medicine 368(14): 1279-1290. Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 2 / 36

  3. Introduction Package overview compareGroups package is meant to facilitate the user to create bivariate tables in an easy and rapid way. It has a lot of parameters to change different options: decimals, reference category, report means or medians, etc. Its code is structured in classes and methods in order to make the syntax code easier (formula, update, subset,...). It is simple and short to change deafault options. A GUI has been implemented for non familiarized R users. ... WUI is under development. compareGroups package (version 1.4) is available on CRAN. The present version, compareGroups 2.0 will be submitted to CRAN soon. Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 3 / 36

  4. Introduction Other existing R packages Already existent many functions to display descriptives: summaryBy [doBy] , stat.desc [pastecs] , ctab [catspec] , stat.table [Epi] , tableNominal, tableDate, tableContinuous [reporttools] , summary.formula [Hmisc] , . . . Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 4 / 36

  5. Introduction Other existing R packages But . . . Some of them too much specific: only categorical or only continuous Don’t mix categorical, normal (mean-SD), non-normal (quantiles) Not very intuitive to customize tables No GUI’s, Difficult to add HR/OR, to deal with time-to-event variables, . . . , Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 5 / 36

  6. Introduction Improvements in 2.0 version Improvements in current version Missingness test, Analysis of genetic data (SNPs), Export tables to PDF, Generation of exhaustive report to PDF file, Create plots in pdf, bmp, jpeg, png or tiff. More formats in reporting statistics: mean ± SD, . . . , More detailed vignette with new data set (PREDIMED), GUI improved, WUI interface to use it from a remote server, web site to recieve feed back, publish package news, etc. http://www.comparegroups.eu Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 6 / 36

  7. How to use it 1 By syntax (full functionallity) 2 By GUI ( tcltk ) 3 By WUI (no R installation required) under development Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 7 / 36

  8. Classes and methods structure update methods displaying modifying subset print update print rbind summary summary subset ‘[’ cbind plot rbind plot already implemented classes compareGroups createTable new improved functions export2: compareGroups createTable latex , csv, html, pdf compareSNPs* missingTable* report Step 1: Step 3: Step 2: Computations Exportation Construction Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 8 / 36

  9. Results On R console Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 9 / 36

  10. Results LaTeX format MALE FEMALE No event Event No event Event HR HR N=2528 N=151 N=3544 N=101 Epidemiological: Age 66.0 ± 6.49 68.3 ± 7.02 1.06 [1.03;1.08] 67.6 ± 5.78 71.0 ± 5.71 1.10 [1.07;1.14] Body mass index 29.3 ± 3.31 29.4 ± 3.72 1.01 [0.97;1.06] 30.5 ± 4.06 30.3 ± 4.18 0.99 [0.94;1.04] Waist circumference 103 ± 9.57 104 ± 10.1 1.01 [0.99;1.02] 98.3 ± 10.8 99.4 ± 10.9 1.01 [1.00;1.03] Waist-to-height ratio 0.62 ± 0.06 0.62 ± 0.06 13.2 [0.85;205] 0.64 ± 0.07 0.65 ± 0.07 13.5 [0.89;204] History: Smoking: Never 27.0% 16.6% Ref. 87.4% 88.1% Ref. Current 24.8% 26.5% 1.63 [0.99;2.69] 5.14% 8.91% 1.94 [0.97;3.84] Former 48.2% 57.0% 1.92 [1.23;3.00] 7.51% 2.97% 0.43 [0.14;1.35] Hypertension 77.7% 79.5% 1.20 [0.81;1.79] 86.4% 89.1% 1.31 [0.70;2.46] Type-2 diabetes 52.0% 64.2% 1.59 [1.14;2.22] 43.1% 63.4% 2.12 [1.41;3.18] Dyslipidemia 66.6% 58.9% 0.81 [0.58;1.11] 77.4% 61.4% 0.52 [0.35;0.78] Family history 17.4% 14.6% 0.89 [0.57;1.41] 26.5% 28.7% 1.18 [0.77;1.82] Mediterranean diet: Intervention group: Control 29.8% 38.4% Ref. 33.6% 38.6% Ref. MedDiet + Nuts 36.7% 27.2% 0.54 [0.36;0.80] 31.1% 28.7% 0.78 [0.48;1.26] MedDiet + VOO 33.5% 34.4% 0.71 [0.49;1.03] 35.3% 32.7% 0.69 [0.43;1.10] MeDiet Adherence score 9.00 [8.00;10.0] 8.00 [7.00;10.0] 0.87 [0.81;0.94] 9.00 [7.00;10.0] 8.00 [7.00;9.00] 0.88 [0.80;0.97] Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 10 / 36

  11. Results On HTML format Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 11 / 36

  12. Plots univariate Normality plots of 'Body mass index' Barplot of 'Smoking' Histogram Normal Q−Q Plot mean= 30.0 SD= 3.82 4 0.08 Theoretical Quantiles 2 3000 0 0.04 −2 0.00 −4 20 25 30 35 40 45 50 20 25 30 35 40 45 50 2000 Freq Sample Quantiles Standard deviation Boxplot from normality 50 2.0 45 1000 1.5 40 desv. 35 1.0 30 0.5 25 0.0 20 0 20 25 30 35 40 45 50 Never Current Former K−M survival of 'tevent' 1.0 0.8 0.6 survival 0.4 0.2 0.0 0 1 2 3 4 5 6 7 time Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 12 / 36

  13. Plots bivariate Boxplot of 'Body mass index' by 'Intervention group' Barplot of 'Smoking' by 'Intervention group' Never Current 50 Former 1500 45 40 1000 Freq 35 30 500 25 20 0 Control MedDiet + Nuts MedDiet + VOO Control MedDiet + Nuts MedDiet + VOO K−M survival of 'tevent' by 'Smoking' 1.0 0.8 0.6 survival 0.4 0.2 Never Current 0.0 Former 0 1 2 3 4 5 6 7 time Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 13 / 36

  14. By syntax Select variables, type, ... > res <- compareGroups(tevent ~ .-toevent-event, + data = predimed, + method = c(p14 = 2), + ref.no = ✬ no ✬ ) > res -------- Summary of results by groups of ✬ tevent ✬ --------- var N p.value method selection 1 Intervention group 6324 0.011** categorical ALL 2 Sex 6324 <0.001** categorical ALL 3 Age 6324 <0.001** continuous normal ALL 4 Smoking 6324 <0.001** categorical ALL 5 Body mass index 6324 0.455 continuous normal ALL 6 Waist circumference 6324 0.003** continuous normal ALL 7 Waist-to-height ratio 6324 0.079* continuous normal ALL 8 Hypertension 6324 0.578 categorical ALL 9 Type-2 diabetes 6324 <0.001** categorical ALL 10 Dyslipidemia 6324 <0.001** categorical ALL 11 Family history of premature CHD 6324 0.640 categorical ALL 12 Hormone-replacement therapy 5661 0.195 categorical ALL 13 MeDiet Adherence score 6324 <0.001** continuous non-normal ALL ----- Signif. codes: 0 ✬ ** ✬ 0.05 ✬ * ✬ 0.1 ✬ ✬ 1 Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 14 / 36

  15. By syntax Building the table > restab <- createTable(res) No event Event p.overall N=6072 N=252 Intervention group: 0.011 Control 1945 (32.0%) 97 (38.5%) MedDiet + Nuts 2030 (33.4%) 70 (27.8%) MedDiet + VOO 2097 (34.5%) 85 (33.7%) Sex: < 0.001 Male 2528 (41.6%) 151 (59.9%) Female 3544 (58.4%) 101 (40.1%) Age 66.9 (6.14) 69.4 (6.65) < 0.001 Smoking: < 0.001 Never 3778 (62.2%) 114 (45.2%) Current 809 (13.3%) 49 (19.4%) Former 1485 (24.5%) 89 (35.3%) Body mass index 30.0 (3.81) 29.8 (3.92) 0.455 Waist circumference 100 (10.6) 102 (10.6) 0.003 Waist-to-height ratio 0.63 (0.07) 0.63 (0.07) 0.079 Hypertension: 0.578 No 1047 (17.2%) 42 (16.7%) Yes 5025 (82.8%) 210 (83.3%) Type-2 diabetes: < 0.001 No 3231 (53.2%) 91 (36.1%) Yes 2841 (46.8%) 161 (63.9%) Dyslipidemia: < 0.001 No 1645 (27.1%) 101 (40.1%) Yes 4427 (72.9%) 151 (59.9%) Family history of premature CHD: 0.640 No 4694 (77.3%) 201 (79.8%) Yes 1378 (22.7%) 51 (20.2%) Hormone-replacement therapy: 0.195 No 5341 (98.2%) 223 (99.6%) Yes 96 (1.77%) 1 (0.45%) MeDiet Adherence score 9.00 [7.00;10.0] 8.00 [7.00;10.0] < 0.001 Isaac Subirana & Joan Vila (RICAD) compareGroups updated: version 2.0 July 10-12, 2013 15 / 36

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend