Organizing a project, making a table Biostatistics 212 Session 5.

Slides:



Advertisements
Similar presentations
Do files, log files, and workflow in Stata Biostatistics 212 Lecture 2.
Advertisements

Using Excel Biostatistics 212 Lecture 4. Housekeeping Questions about Lab 3? –replace vs. recode Final Project Dataset! –“Housekeeping” commands vs. data.
Using Excel Biostatistics 212 Lecture 4. Housekeeping Finish Lab 2 today and/or start Lab 3 Mac Addendum Copying and pasting from Stata.
Stata and logit recap. Topics Introduction to Stata – Files / directories – Stata syntax – Useful commands / functions Logistic regression analysis with.
Basics Of Spreadsheets Chapter Spreadsheet spreadsheet: grid of cells, each of which can contain text data or numeric data.
Microsoft Excel Computers Week 4.
Understanding Microsoft Excel
Generating new variables and manipulating data with STATA Biostatistics 212 Lecture 3.
Word Lesson 11 Customizing Tables and Creating Charts Microsoft Office 2010 Advanced Cable / Morrison 1.
Generating new variables and manipulating data with STATA Biostatistics 212 Lecture 3.
1 Committed to Shaping the Next Generation of IT Experts. Chapter 3 – Graphs and Charts: Delivering a Message Robert Grauer and Maryann Barber Exploring.
Generating new variables and manipulating data with STATA Biostatistics 212 Session 2.
Introduction to Excel 2007 Bar Graphs & Histograms Psych 209 February 1st, 2011.
 Explore the principles of cost-volume-profit relationships  Perform a basic what-if analysis  Use Goal Seek to calculate a solution  Create a one-variable.
SPSS Statistical Package for the Social Sciences is a statistical analysis and data management software package. SPSS can take data from almost any type.
Managing Business Data Lecture 8. Summary of Previous Lecture File Systems  Purpose and Limitations Database systems  Definition, advantages over file.
Lesson 1 – Microsoft Excel The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
Making a figure, dates, and other advanced topics Biostatistics 212 Lecture 6.
Making a Pie Chart In Microsoft Excel For PowerPoint WHAT MY DAY IS LIKE.
Exploring Microsoft Excel 2002 Chapter 6 Chapter 6 A Financial Forecast: Workgroups, Auditing, and Templates By Robert T. Grauer Maryann Barber Exploring.
Data Analysis and Security 11 Session Version 1.0 © 2011 Aptech Limited.
Using Excel Biostatistics 212 Lecture 4. Housekeeping Questions about Lab 3? Final Project Dataset! –Check in.
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
P366: Lecture #1 Use of Excel for analysis Lei Chen, MD Jan 6, 2002.
IENG 423 Design of Decision Support Systems Modeling with Excel Excel Basics.
Making Tables and Figures with Stata Biostatistics 212 Lecture 6.
Examples of different formulas and their uses....
1 Performing Spreadsheet What-If Analysis Applications of Spreadsheets.
Exploring Microsoft Office XP - Microsoft Word 2002 Chapter 71 Exploring Microsoft Word Chapter 7 The Expert User: Workgroups, Forms, Master Documents,
Microsoft Word 2003 Word Processing. The Word 2003 Screen Menu Bar Title Bar Standard ToolbarFormatting Toolbar Vertical Scroll Bar Horizontal Scroll.
Creating Tables in a Web Site
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Lesson 1 Introduction.
Organizing a project, making a table Biostatistics 212 Lecture 7.
1 Lesson 18 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Basic epidemiologic analysis with Stata Biostatistics 212 Lecture 5.
Key Applications Module Lesson 21 — Access Essentials
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 23 Getting Started with Access Essentials 1 Morrison / Wells / Ruffolo.
By: Jennifer Huff & Courtney Stenzhorn. What Do YOU Know???
Using PTOManager.co m to create a Student Directory May 4, 2009 L.P.S. VIPS Meeting.
Organizing a project, making a table Biostatistics 212 Lecture 7.
Using Excel Biostatistics 212 Lecture 4. Housekeeping Questions about Lab 3? –replace vs. recode –Cross-checking/recoding missing values –Analysis of.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
Making Tables and Figures with Stata Biostatistics 212 Lecture 6.
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
Using Google Sheets To help with data. Sheets is a spreadsheet program that can interface with Docs, or Slides A spreadsheet program has cells (little.
PowerPoint Lesson 6 Working with Tables and Charts Microsoft Office 2010 Advanced Cable / Morrison 1.
Lesson 1 – Microsoft Excel * The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
1. 2 Word Processing Word Processing is writing words and sentences on the computer. It is easy to change or move text in a word document. People use.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Comparison of different output options from Stata
Computer Parts Microsoft Word Microsoft Excel Microsoft.
MS Word 2010 Tutorial Prepared by: Mr. R. De Vera ii.
1. Tables, Charts, and Graphs Microsoft Word & Excel 2003.
Function Of Microsoft Words Tables. Where Table section is located Table section is located on top row with File, Edit, View, Insert, Format, Tools, Window.
Graphing in Excel X-Y Scatter Plot SCI 110 CCC Skills Training.
An electronic document that stores various types of data.
Get up to speed Save your files in the format that works best Access 2007 uses a new file format and a new file extension. What does that mean to you?
COM: 111 Introduction to Computer Applications Department of Information & Communication Technology Panayiotis Christodoulou.
Microsoft Excel 2007 Noris Bt. Ismail Faculty of Information and Communication Technology Tel : (Ext 8408) BCOMP0101.
It’s a Spreadsheet What’s a Spreadsheet. A spreadsheet is: An interactive computer program that organizes and analyzes data.
Understanding Microsoft Excel
Understanding Microsoft Excel
Microsoft Excel Basic Skills
Integrating Word, Excel, Access, and PowerPoint
MS-Office It is a Software Package It contains some programs like
Understanding Microsoft Excel
Understanding Microsoft Excel
Charts A chart is a graphic or visual representation of data
Spreadsheets and Data Management
Presentation transcript:

Organizing a project, making a table Biostatistics 212 Session 5

Today... How do you keep all those datasets, do files, and log files organized? Steps in making a Table Formatting a Table with Microsoft Word Formatting a Table with Microsoft Excel

Organizing your Stata files Pitfalls –Proliferating dataset –Can’t remember what you did –Can’t remember why you did it –Can’t easily redo with new data

Organizing your Stata files My system (it’s not perfect) 1) Import data into Stata, and SAVE raw dataset 2) Write a do file that “cleans” your data, and saves it as a new clean dataset 3) Write do files for each component of your analysis

Raw data.xls Raw data.dta In Stata Cut and paste Clean data.dta Data prep.doData prep.logTable 1.do Table 2.do Figure 1.do Text data.do etc Table 1.log Table 2.log Figure 1.log Text data.log etc Table 1.xls Table 1.doc Cut and paste My organizational scheme

Organizing your Stata files My system, Step 1 Import data –Minimal pre-processing before importation –Save your raw file – this is the ONLY time you should save a Stata dataset “manually” (i.e. not from a do file)

Organizing your Stata files My system, Step 2 Do file to clean the data should: –Load the RAW data –Generate, modify and label variables as needed –Save the CLEAN data (save command in the do file) –Log the output

Organizing your Stata files My system, Step 3 Analysis do files should –Load the CLEAN data –Do the analysis –Log the output –EVERY number in every table, figure and in the text should be in the logged output

Organizing your Stata files You will end up with: –2 datasets Data, from Excel.dta Data.dta –1 do file used for cleaning Data prep.do –“x” do files used for analysis Table 1.do, Figure 1.do, Text data.do, etc –Matching log files (with the same names) for each do file Data prep.log, Table 1.log, Figure 2.log, Text data.log, etc

Raw data.xls Raw data.dta In Stata Cut and paste Clean data.dta Data prep.doData prep.logTable 1.do Table 2.do Figure 1.do Text data.do etc Table 1.log Table 2.log Figure 1.log Text data.log etc Table 1.xls Table 1.doc Cut and paste My organizational scheme

Organizing your Stata files Put them all in one folder called, “Stata files”, sort by file type. Example

Organizing your Stata files What do you do if… You want to try 2 different ways of doing something –DON’T create more datasets –DO add more variables in the Data Prep.do (agecat1, agecat2)

Organizing your Stata files What do you do if… You can’t remember what you did –Just look up the correct do file/log file and see

Organizing your Stata files What do you do if… You can’t remember why you did it –DOCUMENT your reasoning with comments in both data prep and analysis do files –Remember how to insert comments: * Comment on 1 line only /* Comment on multiple lines */

Organizing your Stata files What do you do if… You need to redo with new data –Import the new data, save over the RAW dataset –Rerun your Data Prep.do file –Rerun your analysis do files

Organizing your Stata files What do you do if… You need to redo with new age categories, etc –Fix your Data Prep.do file –Rerun your Data Prep.do file –Rerun your analysis do files

Organizing your Stata files What do you do if… You need to redo with new analytic approach –Fix your analysis do file –Rerun your analysis do file

Organizing your Stata files Questions?

Tables Two main purposes –Present the facts compactly –Provide side-by-side comparisons Six main components: –Title, row heading, column headings –Rows –Data –Footnotes

Steps to making a Table Decide what the Table will be about Make the dummy table –Do this FIRST!! Write a do file that will produce each number you need Copy and paste the data in (if possible) Format so it looks nice

Steps to making a Table Deciding what the Table will be about –I like to sketch it out first –Logical flow Table 1 describes the sample (stratified by a predictor?) Table 2+ explores bivariate relationship of main predictor with the outcome Table 3+ explores results of adjusting for confounders Other Tables, Figures for interactions, etc.

Steps to making a Table Make the dummy table first –Makes you specify what you actually want! –Guides the analysis –Excel or Word

Steps to making a Table Write a do file that will produce each number you need –Iterative process, as you know

Steps to making a Table Copy and Paste the data in –Copy and Paste each number, or –“Copy Table” (under the “Edit” menu) –Minimize manual retyping, rounding –Use Excel to calculate and round for you

Steps to making a Table Format it so it looks nice –Choose a journal you like, copy the format! Note horizontal lines, not vertical ones… Double-space your version Footnote as you go - *, †, ‡, §, ║, ¶ –Create a template

Word vs. Excel for Tables Stata  Word –Fewer steps, fewer files –But… more cells to create formatting less flexible Cut and Paste doesn’t work so well

Word vs. Excel for Tables Stata  Excel  Word –Can cut and paste values or whole tables –Set rounding, do calculations easily –Formatting easier? –Copy and Paste into Word (extra step) –EXAMPLE

Summary It’s worth putting thought into your file organization Document everything you do! Mock up your table before doing the analysis Make your tables clear, and pretty

Lab this week Time for you to do your Final Project

To come… Lecture 6 – Figures with Stata, Excel Lab 6 – More time for final project Final project due Tuesday, December 7th