Comparison of different output options from Stata

Slides:



Advertisements
Similar presentations
KompoZer. This is what KompoZer will look like with a blank document open. As you can see, there are a lot of icons for beginning users. But don't be.
Advertisements

Microsoft Excel Presented by ShoWorks Fair Software and Online Entries
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Excel Tutorial 2: Formatting Workbook Text and Data
1 CA202 Spreadsheet Application Combining Data from Multiple Sources Lecture # 6.
Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
Microsoft Excel 2010 ® ® Tutorial 6: Managing Multiple Worksheets and Workbooks.
With Microsoft Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Copyright 2003 Peter McDevitt 1 Microsoft Excel 2002 Lecture 3 – A Professional Looking Worksheet.
Newsletter Plugin The newsletter plugin allows you to create and send newsletters to a managed list or multiple lists of users. Your users can subscribe.
SUNY Morrisville-Norwich Campus- Week 7 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
XP New Perspectives on Microsoft Office Excel 2003, Second Edition- Tutorial 11 1 Microsoft Office Excel 2003 Tutorial 11 – Importing Data Into Excel.
1 Introduction to OBIEE: Learning to Access, Navigate, and Find Data in the SWIFT Data Warehouse Lesson 8: Printing and Exporting an OBIEE Analysis This.
Tutorial 11: Connecting to External Data
PowerPoint: Tables Computer Information Technology Section 5-11 Some text and examples used with permission from: Note: We are.
Adding Automated Functionality to Office Applications.
XP New Perspectives on Microsoft Access 2002 Tutorial 71 Microsoft Access 2002 Tutorial 7 – Integrating Access With the Web and With Other Programs.
Pasewark & Pasewark 1 Access Lesson 6 Integrating Access Microsoft Office 2007: Introductory.
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
ADVANCED MICROSOFT POWERPOINT Lesson 6 – Creating Tables and Charts
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Excel 2007 Part (2) Dr. Susan Al Naqshbandi
Using Dreamweaver. Slide 1 Dreamweaver has 2 screens that do different things The Document window where you create your WebPages The Site window where.
SqlReports Dean Dahlvang PSUG-MO March About Dean Dean Dahlvang Director of Administrative Technology for the Proctor.
Chapter 10: Working with Large Data Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
Using a Spreadsheet Chapter 5.
ACOT Intro/Copyright Succeeding in Business with Microsoft Excel
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
Website Development with Dreamweaver
The Advantage Series ©2004 The McGraw-Hill Companies, Inc. All rights reserved Chapter 8 Managing Worksheet Lists Microsoft Office Excel 2003.
Chapter 19 Managing Worksheet Lists. Creating Lists ► Microsoft Office Excel 2003 is inarguably the most powerful electronic spreadsheet available. ►
1 Performing Spreadsheet What-If Analysis Applications of Spreadsheets.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
Advanced Lesson 5: Advanced Data Management Excel can import data, or bring it in from other sources and file formats. Importing data is useful because.
1 Committed to Shaping the Next Generation of IT Experts. Chapter 8 Exchanging Data Between Access and Other Applications Exploring Microsoft Office Access.
Chapter 17 Creating a Database.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 23 Getting Started with Access Essentials 1 Morrison / Wells / Ruffolo.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. Office Word 2007 Lab 3 Creating Reports and Tables.
The Advantage Series © 2004 The McGraw-Hill Companies, Inc. All rights reserved CHAPTER 1 Integrating Office Word and Office Excel.
Microsoft ® Office Excel 2003 Training Using XML in Excel SynAppSys Educational Services presents:
Microsoft Excel 2003 Illustrated Complete Data with Other Programs Exchanging.
1 Chapter 7: Customizing and Organizing Project Results 7.1 Combining Results 7.2 Updating Results 7.3 Customizing the Output Style (Self-Study)
Page Layout You can quickly and easily format the entire document to give it a professional and modern look by applying a document theme. A document theme.
Chapter 2: Excel Basics and Formatting Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 18 Getting Started with Excel Essentials 1 Morrison / Wells / Ruffolo.
1 Lesson 18 Getting Started with Excel Essentials Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
Lesson 1: What is Excel. Microsoft Office Excel 2003  Excel is a powerful spreadsheet programs that allows users to organize data, complete calculations,
Connecting to External Data. Financial data can be obtained from a number of different data sources.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
1 Word Processing Intermediate Using Microsoft Office 2000.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Microsoft Excel 2007 Noris Bt. Ismail Faculty of Information and Communication Technology Tel : (Ext 8408) BCOMP0101.
Microsoft Excel Illustrated Introductory Workbooks and Preparing them for the Web Managing.
Excel Tutorial 8 Developing an Excel Application
Formulas and Functions
Introduction to OBIEE:
Practical Office 2007 Chapter 10
Microsoft Office Illustrated
ECONOMETRICS ii – spring 2018
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Lesson 17 Getting Started with Excel Essentials
Lesson 18 Getting Started with Excel Essentials
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Eviews Tutorial for Labor Economics Lei Lei
Tutorial 7 – Integrating Access With the Web and With Other Programs
Tutorial 8 Sharing, Integrating, and Analyzing Data
Presentation transcript:

Comparison of different output options from Stata Emma Slaymaker Milly Marston Estelle Mclean

Output- Stata’s weak spot? Stata has lacked commands to export nicely formatted results This is changing – Stata 13 introduced putexcel and _docx These have been expanded in Stata 14 User written commands for exporting particular sets of results Creative thinking with existing commands will get you a long way

Commands to output results Existing: outsheet (reshape and collapse) file write New in Stata 13: putexcel _docx User- written: estout

Example data Using one of Stata’s example datasets To get it type sysuse nlsw88,clear The do file for this presentation is on the CSM webpage Data from US National Longitudinal Survey of Mature and Young women (I think). Data on mean hourly wage by industry and some background characteristics.

Sample results (1): graph of hourly wage by industry

Sample results (2): Table showing the proportion of women who were in a union and the proportion who were college graduates, across the different industries.

Sample results (3): Linear regression of hourly wage by industry and background characteristics

outsheet turns datasets into spreadsheet format outsheet saves the dataset in memory to a text file in a delimited format Most spreadsheet software will read this but won’t read a Stata dataset Default is a tab-delimited format columns of data (variables) are separated by tabs You can specify other delimiters

To simply make a table that you can use in Word or Excel Three steps: Use collapse to get the summaries you want Use reshape to arrange the dataset like a spreadsheet table Use outsheet to save this as a text file

estout saves regression results in a text or HTML file A user written command, to get it type: net search estout,pkg Click on the first entry and then the install link. Produces a text file containing stored estimates Step 1) Run regression model Step 2) Store results using estimates store mymodel Step 3) Use estout to create the results file Many, many options- best to look at the website: http://repec.org/bocode/e/estout/

_docx: Make your own Word documents This is a Mata command Mata is one of Stata’s programming languages access it from within Stata using mata prefix Makes an Open Office Word document From your do file you can insert text, graphs, data from Stata’s memory matrices return results You can build custom tables You can format the contents of the document

_docx: Make your own Word documents You tell Stata that you want a new word document and give it a file handle a short name to refer to it by Stata creates the file in memory As you carry out your analysis you send results to the file When you save the file, it is written to disk. You won’t see anything until you save it. You can write the file in any order, and go back and edit it.

_docx- the downsides It all seems a bit half-finished Some of the documentation is not very helpful A lot of this isn’t documented in Stata help or the manuals, but this website is very useful- http://www.stata.com/docx-styles/ There is still a lot of formatting that you can’t do. Although the command writes an Open Office XML file, you can’t get at the XML

putexcel to make a spreadsheet of results Quick and easy command Can make workbooks with multiple sheets Can add in all types of results and graphs (v 14 only) Need to manipulate stored estimates and returned results for best effect Can modify existing workbooks, and retain cell formats Control formats- better in Stata 14 than 13

putexcel the downsides You have to specify destination cell references If the number of items in your results change then you need to update the destination references To fix this: you either need a lot of programming or a lot of work editing your do file

The file command Lets you read and write files outside Stata Files either binary or text Simple principle Straightforward syntax Totally flexible A how to guide: http://www.stata-journal.com/sjpdf.html?articlenum=dm0015

file write to make custom text files Use with loops Extract results from return or ereturn Format them Send them to the text file Can optionally add tags for XML or LaTeX

Comparison of the different options putexcel file write mata _docx File format: Excel- widely used Not tied to particular software Makes an Open Office doc Control over formatting results Can’t format results (Stata 13) Good control over formatting (Stata 14) Can format very well if include additional markup such as XML or LaTeX Can format results but some limitations (table columns) Ease of use Quick and easy version of command No simple option but easy to learn No simple option, need to know a bit of Mata Include graphs No (Stata 13) Yes (Stata 14) No- not in text files Yes - in HTML Yes

Comparison of the different options putexcel file write mata _docx How much work to map out a structure for the results Easy to overwrite results, you must specify the correct row numbering No need to specify row numbers but you need structure do file to make sure things are written in correct columns Need to organise results and navigate row numbers in tables Sequence for writing the file You can write the worksheet in any order Only writes in order from top left to bottom right Can write and later modify things Number of files that can be written to at one time Only write to one file at a time with advanced syntax Easy to write to different files Can send output to different doc files from within same do file

What are they good for? file write putexcel mata _docx Flexibility Tables Fast execution Repeated outputs putexcel Quickly dropping unformatted results into Excel Single outputs mata _docx Including image files into document Putting entire dataset into document (e.g. r(table) ) With additional markup (e.g. xml): - Lovely formatting - Structured workbooks