Statistical Tables and Plots using S and LATEX

Statistical Tables and Plots using S and LATEX -...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Statistical Tables and Plots using S and L A T E X FE Harrell Department of Biostatistics Vanderbilt University School of Medicine [email protected] biostat.mc.vanderbilt.edu * July 20, 2007 Contents 1 Introduction to L A T E X 3 1.1 Two L A T E X Output Modes . . . . . . . . . . . . . . . . . . . . 4 1.2 Basic Table Making in L A T E X . . . . . . . . . . . . . . . . . . 6 2 Using S to Fill in Cells in L A T E X Tables 7 3 Using S to Create Graphics for L A T E X 10 3.1 Inserting Graphics Files into L A T E X Documents . . . . . . . . 11 4 Making S Compose L A T E X Tables 12 * Document Address: http://biostat.mc.vanderbilt.edu/twiki/pub/Main/ StatReport/summary.pdf . This document was produced using TeT E X on Ubuntu Linux using R version 2.5.1 and version 3.3-3 (17Jul07) of the Hmisc package. All com- mands and output will be the same for S-P lus except that Greek letters, superscripts, and subscripts will not appear in plots. 1 LIST OF TABLES LIST OF TABLES 4.1 Reports Formatted to Describe Responses . . . . . . . . . . . 14 4.2 Baseline Characteristic Tables . . . . . . . . . . . . . . . . . . 28 4.3 Data Displays from Cross–Classifying Variables . . . . . . . . 42 5 Handling Special Variables 44 5.1 Multiple Choice Variables . . . . . . . . . . . . . . . . . . . . 44 5.2 Conditionally Defined Variables . . . . . . . . . . . . . . . . . 49 6 Alternate Approaches 49 6.1 Literate Programming . . . . . . . . . . . . . . . . . . . . . . 49 7 Data Preparation 50 8 Inserting L A T E X Output into non–L A T E X Applications 52 9 S Documention 55 10 L A T E X Code for This Document 55 List of Tables 1 Overall Results . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 Overall Results . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 Statistical Results . . . . . . . . . . . . . . . . . . . . . . . . 9 4 Survival N=418 . . . . . . . . . . . . . . . . . . . . . . . . 17 5 S by drug N=418 . . . . . . . . . . . . . . . . . . . . . . . 20 6 Cholesterol and Serum Bilirubin N=284, 134 Missing . . . 24 2 LIST OF FIGURES 1 INTRODUCTION TO L A T E X 7 Serum Bilirubin (D-penicillamine) N=154 . . . . . . . . . 25 8 Serum Bilirubin (placebo) N=158 . . . . . . . . . . . . . . 26 9 Descriptive Statistics by drug . . . . . . . . . . . . . . . . . . 30 10 Descriptive Statistics by drug . . . . . . . . . . . . . . . . . . 34 11 Descriptive Statistics by Stage . . . . . . . . . . . . . . . . . 38 12 Descriptive Statistics by Stage . . . . . . . . . . . . . . . . . 41 13 mean by sz, bone . . . . . . . . . . . . . . . . . . . . . . . . . 42 List of Figures 1 Kaplan–Meier estimates . . . . . . . . . . . . . . . . . . . . . 18 2 Estimated life length . . . . . . . . . . . . . . . . . . . . . . . 19 3 Estimated life length stratified by treatment . . . . . . . . . . 21 4 Distribution of cholesterol and bilirubin . . . . . . . . . . . . 23 5 Mean and median bilirubin for treated patients . . . . . . . . 27 6 Categorical variables stratified by drug . . . . . . . . . . . . .....
View Full Document

{[ snackBarMessage ]}

Page1 / 82

Statistical Tables and Plots using S and LATEX -...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online