AUTOMATED STANDARD ERROR (SE) CALCULATION WITH PUMS DATA WITH EXCEL PIVOT TABLE

Similar documents
Construction Administrators Work Smart with Excel Programming and Functions. OTEC 2014 Session 78 Robert Henry

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

Introduction to Pivot Tables in Excel 2007

VBA PROGRAMMING FOR EXCEL FREDRIC B. GLUCK

Microsoft Excel 2013: Macro to apply Custom Margins, Titles, Gridlines, Autofit Width & Add Macro to Quick Access Toolbar & How to Delete a Macro.

Excel Pivot Tables. Blue Pecan Computer Training Ltd - Onsite Training Provider :: :: info@bluepecan.co.

Highline Excel 2016 Class 26: Macro Recorder

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

Microsoft Office Access 2007 which I refer to as Access throughout this book

Microsoft Excel 2013 Step-by-Step Exercises: PivotTables and PivotCharts: Exercise 1

Microsoft Office 2007 Orientation Objective 1: Become acquainted with the Microsoft Office Suite 2007 Layout

Working with Macros and VBA in Excel 2007

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Word 2010: Mail Merge to with Attachments

warpct.com Working with MS Excel 2003 Workbook courseware by WARP! Computer Training

Excel macros made easy

Analyzing Excel Data Using Pivot Tables

Excel 2013 What s New. Introduction. Modified Backstage View. Viewing the Backstage. Process Summary Introduction. Modified Backstage View

Chapter 4 Displaying and Describing Categorical Data

MS Excel Template Building and Mapping for Neat 5

Sample- for evaluation purposes only! Advanced Excel. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

Mail Merge Creating Mailing Labels 3/23/2011

3 What s New in Excel 2007

A Beginning Guide to the Excel 2007 Pivot Table

Automate tasks with Visual Basic macros

Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

SAP BUSINESS OBJECT ANALYSIS FOR EXCEL DEVELOPER GUIDE

Introduction to Microsoft Access 2003

Pastel Evolution BIC. Getting Started Guide

Microsoft Office 2007

Basic Microsoft Excel 2007

Getting Started Guide SAGE ACCPAC INTELLIGENCE

Microsoft Access 2010 Part 1: Introduction to Access

Advanced Excel 10/20/2011 1

In This Issue: Excel Sorting with Text and Numbers

How To Create A Report In Excel

Scientific Graphing in Excel 2010

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Instructions for applying data validation(s) to data fields in Microsoft Excel

Microsoft Excel Introduction to Microsoft Excel 2007

Microsoft Access 2010 handout

SharePoint List Filter Favorites Installation Instruction

Excel Reporting with 1010data

DataPA OpenAnalytics End User Training

Part A: Introduction to Excel VBA

The first thing to do is choose if you are creating a mail merge for printing or an merge for distribution over .

Creating a connection using Microsoft Excel 2007, 2010, 2013

Introduction to Microsoft Excel 2010

Microsoft PowerPoint Tutorial

Microsoft Excel 2013 Tutorial

Advanced Excel Charts : Tables : Pivots : Macros

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

Excel Reports and Macros

Excel 2003 PivotTables Summarizing, Analyzing, and Presenting Your Data

Microsoft Office Excel 2013

Microsoft Excel 2013: Using a Data Entry Form

Using Excel As A Database

Microsoft Excel 2010 Part 3: Advanced Excel

How to Use a Data Spreadsheet: Excel

Task Force on Technology / EXCEL

Microsoft Excel 2010 Pivot Tables

Excel 2007 Basic knowledge

Microsoft Outlook Reference Guide for Lotus Notes Users

Tommy B. Harrington 104 Azalea Drive Greenville, NC

This document describes the capabilities of NEXT Analytics v5.1 to retrieve data from Google Analytics directly into your spreadsheet file.

Financial Data Access with SQL, Excel & VBA

Getting Started Guide

Trial version of GADD Dashboards Builder

Lab 2: MS ACCESS Tables

Microsoft Excel: Pivot Tables

Using Excel for Business Analysis: A Guide to Financial Modelling Fundamentals

Using the Advanced Tier Data Collection Tool. A Troubleshooting Guide

Tips and Tricks SAGE ACCPAC INTELLIGENCE

Produced by Flinders University Centre for Educational ICT. PivotTables Excel 2010

Microsoft. Outlook ADVANCED FEATURES AND FUNCTIONS

Introduction to Pivot Tables in Excel 2003

New Orleans 2007 Workshop Tips For Using Microsoft Excel to Analyze EMSC Data and Generate Reports Pivot Tables and Other Goodies

MS Access Lab 2. Topic: Tables

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Excel Reports User Guide

SPV Reporting Tool VBA Code User Guide. Last Updated: December, 2009

Data Analysis with Microsoft Excel 2003

Creating and Formatting Charts in Microsoft Excel

Microsoft Access Rollup Procedure for Microsoft Office Click on Blank Database and name it something appropriate.

Project Management Dashboard Pro v5 Documentation

How To Write A Powerpoint Report On An Orgwin Database On A Microsoft Powerpoint 2.5 (Pg2) Or Gpl (Pg3) On A Pc Or Macintosh (Pg4) On An Ubuntu 2.2

SPSS: Getting Started. For Windows

Pivot Tables & Pivot Charts

Simply Accounting Intelligence Tips and Tricks Booklet Vol. 1

Microsoft Office 2010

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

User Services. Intermediate Microsoft Access. Use the new Microsoft Access. Getting Help. Instructors OBJECTIVES. July 2009

User Guide. Opening secure from the State of Oregon Viewing birth certificate edits reports in MS Excel

About PivotTable reports

Step One. Step Two. Step Three USING EXPORTED DATA IN MICROSOFT ACCESS (LAST REVISED: 12/10/2013)

Create a new investment form and publish it to a SharePoint 2013 forms library

CHAPTER 6: ANALYZE MICROSOFT DYNAMICS NAV 5.0 DATA IN MICROSOFT EXCEL

Instructions for Creating an Outlook Distribution List from an Excel File

ORACLE BUSINESS INTELLIGENCE WORKSHOP

Excel 2003 Tutorials - Video File Attributes

Transcription:

AUTOMATED STANDARD ERROR (SE) CALCULATION WITH PUMS DATA WITH EXCEL PIVOT TABLE Toshihiko Murata American Community Survey (ACS) data comes in many different formats. Public Use Microdata Sample (PUMS) data is one format available that is good for creating custom tabulations that are not the part of predefined ACS tables. In my work, for example, I need the count of persons 16 years or older, currently not attending school, and without a secondary education credential. There is one complication, however. When creating custom tables using PUMS data, standard errors have to be calculated on your own. The formula for calculating SE for PUMS data using replication 4 80 weight is SE X r X 80 r1 2. It is not difficult, but it is repetitive and tedious. Luckily, computers excel at doing this kind of repetitive and tedious task. Microsoft Excel, the commonly accessible computer software, is a good option for this task. It lets users create custom tables easily, and it can automate the SE calculation by using Excel macro (Visual Basic for Application (VBA)), which is already written and shared here. {Demonstration} sample data file http://tinyurl.com/omfhqsa ACS PUMS data Data availability Census (http://www.census.gov/acs/www/data_documentation/pums_data/) IPUMS (Minnesota population center) Data Ferret I prefer using IPUMS or Data Ferret because I can choose only the variables I need for the analysis, keeping the file size relatively small. There are various documents and video tutorials available online on how to use IPUMS and Data Ferret. Download variables of interest, plus main weight and replication weights Main Population weight (PWGTP) Main Household weight (WGTP) Replication weights consist of 80 separate variables for each type of weight (PWGTP1 through PWGTP80 for population, and WGTP1 thorough WGTP80 for household) [1]

File size can easily become very large because you need to get 81 variables for weights alone. An answer to How big is too large for Excel Pivot table? depends largely on the available memory of the computer used in the analysis. My work computer with 16GB of installed memory starts to complain with a database containing 100 variables and 1.7 million rows. The dataset, 2013 ACS 1Year Estimate for the entire U.S. population has a little over 3 million rows of records. This is too big to use in a raw data format. So if I need to use an entire file, I need some kind of work around. Building the Pivot Table The first step is building a pivot table with the downloaded data. Select the insert tab from the ribbon, then click on the pivot table button to start the pivot table dialog. If you have the data file open, that data will be selected as the default. Pivot tables also work with external formats such as MS Access MS SQL Server tables. Once data is selected, click OK. The rest is simple --drag and drop variables into columns, rows and report filter areas of the pivot table--process. PUMS data is weighted (each case represents multiple cases), values or pivot table data field must be set to sum of main weight variable (PWGTP for population, WGTP for households). [2]

Visual Basic Code for Calculating Standard Errors Visual Basic for Application (VBA) for Excel Excel Visual Basic for Application is an application development environment that is particularly suited for data and statistical work. It is full of useful data and statistics-related objects in this object oriented programming environment. For example, Pivot table is one of the Excel objects and is used here. This object is already fully developed and defined, so by using code, we are making this object do useful things and capturing the results. Interaction with VBA code takes place in a separate Visual Basic for Application window. The easiest way to get this window is from the ribbon. The buttons to start this window is hidden by the default. To show this button, use Customize the ribbon dialog, and check the developer option. This will add the developer tab on ribbon. Locations to Store Visual Basic Codes The VBA Codes can be saved in an individual workbook, or in the default VBA code storage called Personal Macro Workbook (personal.xlsb). One advantage of storing codes here is that once this workbook is created, codes in this workbook are always available anytime you start Excel. [3]

The easiest way to create this workbook is by record a macro. When a macro is recorded and saved, Excel will create and save the personal macro workbook with the proper name and the location ( C:\Users\<username>\AppData\Roaming\Microsoft\Excel\XLSTART\personal.xlsb). To record a macro, go to the developer tab on the ribbon, and click the record macro button (see below). In the record macro dialog box, select personal macro workbook option from the dropdown list, and click OK. Then do something (like selecting a different cell). Click on to stop. Open VBA window by clicking the Visual Basic button on the Developer tab. The code just created from recoding is saved under VBA Projects ( prosonal.xlsb ), Modules Module 1, sub Macro1(). [4]

ACS_se.txt To use the standard error calculation code or sub procedure (Sub get_se()), simply copy and paste the code into the modules window, below the End Sub statement. Each VBA sub procedure is marked by Sub and End Sub pair. To run this code, chose Run from the menu or click the Run button on the tool bar while in VBA project editor window, while you have the pivot table open in the main Excel window. The code can be also run on the quick access tool bar, or the ribbon by assigning the code to button that you create. Detailed Look at the VBA code Open the attached Word document for detailed explanations. Microsoft Word Document Importance of Checking SE When Using PUMS data With Excel, it is very easy to drill down to finer and finer subgroups. It is important to keep in mind that SE becomes larger as the grouping becomes finer. Because of this, checking SE frequently along the way is very important. {Demonstration add sex, race and puma sequentially and show what happens to SE} {Demonstration back out, use grouping to reduce SE} Exercise Create a Procedure that Calculates Household SE Copy and paste the sub procedure, get_se(), into the same module. Rename the sub procedure to get_se_hh (or something logical). Replace PWGTP with WGTP (see highlighted area in the annotated code) Optional: rename variables in the code where appropriate Original Word Document and sample data at http://tinyurl.com/omfhqsa [5]