# Module 2 Basic Data Management, Graphs, and Log-Files

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 AGRODEP Stata Training April 2013 Module 2 Basic Data Management, Graphs, and Log-Files Manuel Barron 1 and Pia Basurto 2 1 University of California, Berkeley, Department of Agricultural and Resource Economics 2 University of California, Santa Cruz, Department of Economics AGRODEP Stata Training documents are designed to give AGRODEP members a brief overview of basic Stata commands needed in AGRODEP training courses. These documents have been reviewed but have not been subject to a formal external peer review via IFPRI s Publications Review Committee; any opinions expressed are those of the author(s) and do not necessarily reflect the opinions of AGRODEP or of IFPRI.

2 Module 2 Basic Data Management, Graphs, and Log-Files In this module we will show how to generate new variables in a Stata dataset. We will also show basic commands that can be used to create graphs. We will end the module with a discussion about log-files. For this module we will use the same auto dataset as in Module 1. For details on how to access this dataset, see Module Basic Data Management 1.1 Generating and replacing variables Say we want to generate a new variable for our dataset. We would then use the generate command. In the command window, type help generate As you can see, some simple commands may have complicated help files. Simply stated, you can use the generate command to generate new variables in your dataset, based on operations or combinations of other variables. As in any statistical package, there are some rules as to how to name a variable. The variable name can contain any letter in the English alphabet in upper or lower case (variable names, as commands, are case sensitive), numbers (although the first character cannot be a number), and _ (the underscore symbol). The name can have up to 32 characters. There are two main types of variables: numeric and strings. In plain words, string variables are composed of text, like the name of a state. Numeric variables are numbers, like age. Stata can do any arithmetic operation with numeric variables. You can add values with + ( plus symbol), subtract with - ( minus symbol), multiply with * ( asterisk symbol), and divide with / ( forward slash symbol). You can also raise a number to a power with the ^ ( caret symbol). generate length_over_weight = length / weight We can create indicator variables (dummy variables) easily. Say we want a dummy variable that takes the value of 1 for cars with more than 20 cubic feet of space in the trunk. gen largetrunk = 1 if trunk>=20 1

3 (Notice that we used only the first three characters of the command -gen-, as indicated by its help file). Here we have generated a variable called largetrunk that takes the value of 1 for cars with trunk space larger than 20 cubic feet. However, this variable has missing values for the remaining observations. We want this variable to take the value of 0 for cars with trunk space less than 20 cubic feet. To do this, so we use the replace command: replace largetrunk=0 if trunk<20 Missing values in numerical variables are represented by Stata with a period. and, in numerical terms, they are interpreted by Stata as infinity. For example, if a car had a missing value in the original trunk variable and we do not tell Stata what to do with missing values, Stata will interpret that we want to put a 1 also for the car with missing trunk space (because infinity is indeed larger than 20). One solution for this is to initially specify that trunk must be larger than 20 and not missing. We will generate the variable again, avoiding the possibility of any missing values being counted as large trunks. Before we do this, we need to drop the previous version of the largetrunk variable, using the drop command. drop largetrunk Now, we will generate the variable again, but in a more careful way (specifying that we don t want missing values to be included in the definition of largetrunk ). gen largetrunk = 1 if trunk>=20 & trunk!=. replace largetrunk=0 if trunk<20 Notice that in all of the generate commands in this module, we have used a single equal sign to assign a value to a variable. Remember the discussion in Module 1, where the if conditions required two equal signs for Stata to recognize them properly. We can see this in the following example: Do-file or command Window gen trunk20feet = 1 if trunk==20 Here it is easy to distinguish the difference between one and two equal signs. In the first part of the command, we are asking Stata to create a variable trunk20feet with the value 1 (assigning or modifying a value) and thus we need to use one equal sign. In the second part, in the if statement, we are asking Stata to evaluate whether the already existing variable trunk contains a value of exactly 20, 2

4 and to do this we need to use two equal signs. Using either 2 equal signs in the first part of the command or one equal sign in the if statement will result in an error message. But let s try out some more uses for the generate command. You can generate constants: gen one = 1 Or you can generate an index number for each observation: gen order = _n The first observation has order=1, the second has order=2, and so on until the 74 th observation, which has order=74. We can generate variables by groups. Sort organizes the values in a variable from least to greatest. sort foreign by foreign: gen order = _n We can do the same in one step with the bysort command. First we need to drop the existing order variable. drop order bysort foreign: gen order = _n What we did in the last two examples is to assign, inside the same variable, two different orders for all the observations within each of the two groups in the foreign variable (foreign and domestic cars). In this way, the first domestic car in the dataset got the value 1 in the order variable while the first foreign car in the dataset also got the value 1, and subsequent observations got consecutive numbers according to their orders within their respective groups. 1.2 Advanced Topics: Dates and Extensions to the generate command - egen egen is a useful command for generating means, calculating minimum or maximum values, etc. This is an advanced command that is out of the scope of these notes. It is included only for future reference. See help egen. 3

5 Stata has useful commands to deal with dates, but these are not for introductory level. See help date for more information. The following resources are very helpful for working with dates: Introduction to Graphs with Stata Stata can generate a wide array of graphs. In fact, it has a whole manual exclusively dedicated to graphs. You are encouraged to refer to it for intermediate and advanced graphing options. These notes will cover only basic commands and the most basic options to generate useful graphs. Graphs can also be created and edited using the graphics tool from the drop down menu. Pasting your graphs to other documents - After you have generated a graph, you can right-click on it, copy it and paste it into a document. 4

6 2.1 Scatterplot To generate a scatterplot, use the scatter command followed by the variables you want to plot. You can use if and in to select a subset of data points you want to graph. After scatter, type the variable that you want to plot in the vertical axis (price) and then the variable that will be plotted in the horizontal axis (mpg). The graph below shows the scatterplot of price and mpg for the whole sample. *Do-file or Command Window scatter price mpg scatter price mpg if foreign==1 Price 10,000 15, , Mileage (mpg) 5

7 Density Histograms The histogram command will let you plot the histogram of numerical variables. You can specify either the number of bins (i.e. number of categories or columns) or the binwidth (a fixed width for each category). *Dofile or Command Window histogram length, bin(10) Length (in.) 6

8 0.005 Density * Do-file or Command Window histogram length, width(15) title("my histogram") my histogram Length (in.) In the last command we used the title option to put a title to our graph. This is highly recommended if you are going to paste the graphs into a Word file. 7

9 0 Density Kernel Density Functions - kdensity The kdensity command will graph the kernel density of a variable. The basic syntax is very simple: * Do-file or command window kdensity price Kernel density estimate Price kernel = epanechnikov, bandwidth =

10 0 kdensity price Imagine you want to compare the distribution of prices between foreign and domestic cars. You can graph two (or more) kernel distributions using a command like this: *Do-file or Command Window twoway (kdensity price if foreign==1) (kdensity price if foreign==0) You can use advanced options to change the color of the lines, their thickness or their pattern (continuous vs. dashed, etc.), but this is beyond the scope of these introductory notes x kdensity price kdensity price 3. Log Files We will end this module with a brief discussion about log files. A log file is a text file that records (prints into a text file) all the commands you issue and all the results Stata produces on the screen. In other words, a log file saves everything that appears on the output window into a text file. * Do-file or Command Window log using module1, text This command will create a text file called module1. If you don t specify the text option Stata will generate a *.scml file, which you can only open within Stata. The text option produces a *.txt file, which you can open using any text editor (like Notepad or Word). append and replace are two options that you should specify if you open an existing log file. If you want to add the results to a pre-existing log file, type append. This will continue from the point where the old log file finished and add the new results at the end. If you want to replace the old results with the new results then use the replace option, which will delete the old file. 9

11 * Do-file or Command Window log using module1, text append Or if you want to replace an existing log-file, type: * Do-file or Command Window log using module1, text replace When you are finished and you want to close the log file, type: * Do-file or Command Window log close 4. Wrapping-Up In this module we have presented basic instructions to generate and replace variables. We also presented elementary graph commands, and discussed log-files. This complements the topics covered in Module 1. The material in these first two modules will be useful in the next three modules, where we will apply these tools to regression analysis. 10

### Descriptive Statistics

Descriptive Statistics Descriptive statistics consist of methods for organizing and summarizing data. It includes the construction of graphs, charts and tables, as well various descriptive measures such

### SPSS: Getting Started. For Windows

For Windows Updated: August 2012 Table of Contents Section 1: Overview... 3 1.1 Introduction to SPSS Tutorials... 3 1.2 Introduction to SPSS... 3 1.3 Overview of SPSS for Windows... 3 Section 2: Entering

### Introduction to SPSS 16.0

Introduction to SPSS 16.0 Edited by Emily Blumenthal Center for Social Science Computation and Research 110 Savery Hall University of Washington Seattle, WA 98195 USA (206) 543-8110 November 2010 http://julius.csscr.washington.edu/pdf/spss.pdf

### Scatter Plots with Error Bars

Chapter 165 Scatter Plots with Error Bars Introduction The procedure extends the capability of the basic scatter plot by allowing you to plot the variability in Y and X corresponding to each point. Each

### Data analysis and regression in Stata

Data analysis and regression in Stata This handout shows how the weekly beer sales series might be analyzed with Stata (the software package now used for teaching stats at Kellogg), for purposes of comparing

### ECONOMICS 351* -- Stata 10 Tutorial 2. Stata 10 Tutorial 2

Stata 10 Tutorial 2 TOPIC: Introduction to Selected Stata Commands DATA: auto1.dta (the Stata-format data file you created in Stata Tutorial 1) or auto1.raw (the original text-format data file) TASKS:

### Appendix 2.1 Tabular and Graphical Methods Using Excel

Appendix 2.1 Tabular and Graphical Methods Using Excel 1 Appendix 2.1 Tabular and Graphical Methods Using Excel The instructions in this section begin by describing the entry of data into an Excel spreadsheet.

### SHORT COURSE ON Stata SESSION ONE Getting Your Feet Wet with Stata

SHORT COURSE ON Stata SESSION ONE Getting Your Feet Wet with Stata Instructor: Cathy Zimmer 962-0516, cathy_zimmer@unc.edu 1) INTRODUCTION a) Who am I? Who are you? b) Overview of Course i) Working with

### There are six different windows that can be opened when using SPSS. The following will give a description of each of them.

SPSS Basics Tutorial 1: SPSS Windows There are six different windows that can be opened when using SPSS. The following will give a description of each of them. The Data Editor The Data Editor is a spreadsheet

### Getting started with the Stata

Getting started with the Stata 1. Begin by going to a Columbia Computer Labs. 2. Getting started Your first Stata session. Begin by starting Stata on your computer. Using a PC: 1. Click on start menu 2.

### SPSS 12 Data Analysis Basics Linda E. Lucek, Ed.D. LindaL@niu.edu 815-753-9516

SPSS 12 Data Analysis Basics Linda E. Lucek, Ed.D. LindaL@niu.edu 815-753-9516 Technical Advisory Group Customer Support Services Northern Illinois University 120 Swen Parson Hall DeKalb, IL 60115 SPSS

### Tutorial 3: Graphics and Exploratory Data Analysis in R Jason Pienaar and Tom Miller

Tutorial 3: Graphics and Exploratory Data Analysis in R Jason Pienaar and Tom Miller Getting to know the data An important first step before performing any kind of statistical analysis is to familiarize

### Using Your TI-89 in Elementary Statistics

Using Your TI-89 in Elementary Statistics Level of Handout: Target: Intermediate users of the TI-89. If you are a new user, pair up with someone in the class that is a bit familiar with the TI-89. You

### Constructing Confidence Intervals

Lab 13 Constructing Confidence Intervals In this lab, we will construct and visualize confidence intervals for different sample sizes and different levels of confidence. Sampling Data Please load the following

### Data Analysis. Using Excel. Jeffrey L. Rummel. BBA Seminar. Data in Excel. Excel Calculations of Descriptive Statistics. Single Variable Graphs

Using Excel Jeffrey L. Rummel Emory University Goizueta Business School BBA Seminar Jeffrey L. Rummel BBA Seminar 1 / 54 Excel Calculations of Descriptive Statistics Single Variable Graphs Relationships

### Introduction Course in SPSS - Evening 1

ETH Zürich Seminar für Statistik Introduction Course in SPSS - Evening 1 Seminar für Statistik, ETH Zürich All data used during the course can be downloaded from the following ftp server: ftp://stat.ethz.ch/u/sfs/spsskurs/

### SPSS Manual for Introductory Applied Statistics: A Variable Approach

SPSS Manual for Introductory Applied Statistics: A Variable Approach John Gabrosek Department of Statistics Grand Valley State University Allendale, MI USA August 2013 2 Copyright 2013 John Gabrosek. All

### Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.

Excel Tutorial Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information. Working with Data Entering and Formatting Data Before entering data

### Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

Engineering Problem Solving and Excel EGN 1006 Introduction to Engineering Mathematical Solution Procedures Commonly Used in Engineering Analysis Data Analysis Techniques (Statistics) Curve Fitting techniques

### Microsoft Excel 2010 Part 3: Advanced Excel

CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Microsoft Excel 2010 Part 3: Advanced Excel Winter 2015, Version 1.0 Table of Contents Introduction...2 Sorting Data...2 Sorting

### Minitab Session Commands

APPENDIX Minitab Session Commands Session Commands and the Session Window Most functions in Minitab are accessible through menus, as well as through a command language called session commands. You can

### OECD.Stat Web Browser User Guide

OECD.Stat Web Browser User Guide May 2013 May 2013 1 p.10 Search by keyword across themes and datasets p.31 View and save combined queries p.11 Customise dimensions: select variables, change table layout;

### Descriptive Statistics

Y520 Robert S Michael Goal: Learn to calculate indicators and construct graphs that summarize and describe a large quantity of values. Using the textbook readings and other resources listed on the web

### Spreadsheet software for linear regression analysis

Spreadsheet software for linear regression analysis Robert Nau Fuqua School of Business, Duke University Copies of these slides together with individual Excel files that demonstrate each program are available

### PentaMetric battery Monitor System Sentry data logging

PentaMetric battery Monitor System Sentry data logging How to graph and analyze renewable energy system performance using the PentaMetric data logging function. Bogart Engineering Revised August 10, 2009:

### A Short Guide to R with RStudio

Short Guides to Microeconometrics Fall 2013 Prof. Dr. Kurt Schmidheiny Universität Basel A Short Guide to R with RStudio 1 Introduction 2 2 Installing R and RStudio 2 3 The RStudio Environment 2 4 Additions

Intro to Excel spreadsheets What are the objectives of this document? The objectives of document are: 1. Familiarize you with what a spreadsheet is, how it works, and what its capabilities are; 2. Using

### 4 Other useful features on the course web page. 5 Accessing SAS

1 Using SAS outside of ITCs Statistical Methods and Computing, 22S:30/105 Instructor: Cowles Lab 1 Jan 31, 2014 You can access SAS from off campus by using the ITC Virtual Desktop Go to https://virtualdesktopuiowaedu

### Getting Started with R and RStudio 1

Getting Started with R and RStudio 1 1 What is R? R is a system for statistical computation and graphics. It is the statistical system that is used in Mathematics 241, Engineering Statistics, for the following

### Directions for Frequency Tables, Histograms, and Frequency Bar Charts

Directions for Frequency Tables, Histograms, and Frequency Bar Charts Frequency Distribution Quantitative Ungrouped Data Dataset: Frequency_Distributions_Graphs-Quantitative.sav 1. Open the dataset containing

### Visualizing Data. Contents. 1 Visualizing Data. Anthony Tanbakuchi Department of Mathematics Pima Community College. Introductory Statistics Lectures

Introductory Statistics Lectures Visualizing Data Descriptive Statistics I Department of Mathematics Pima Community College Redistribution of this material is prohibited without written permission of the

### Appendix III: SPSS Preliminary

Appendix III: SPSS Preliminary SPSS is a statistical software package that provides a number of tools needed for the analytical process planning, data collection, data access and management, analysis,

### WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math

Textbook Correlation WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Following Directions Unit FIRST QUARTER AND SECOND QUARTER Logic Unit

### 0 Introduction to Data Analysis Using an Excel Spreadsheet

Experiment 0 Introduction to Data Analysis Using an Excel Spreadsheet I. Purpose The purpose of this introductory lab is to teach you a few basic things about how to use an EXCEL 2010 spreadsheet to do

### Technology Step-by-Step Using StatCrunch

Technology Step-by-Step Using StatCrunch Section 1.3 Simple Random Sampling 1. Select Data, highlight Simulate Data, then highlight Discrete Uniform. 2. Fill in the following window with the appropriate

### Plotting: Customizing the Graph

Plotting: Customizing the Graph Data Plots: General Tips Making a Data Plot Active Within a graph layer, only one data plot can be active. A data plot must be set active before you can use the Data Selector

### Describing, Exploring, and Comparing Data

24 Chapter 2. Describing, Exploring, and Comparing Data Chapter 2. Describing, Exploring, and Comparing Data There are many tools used in Statistics to visualize, summarize, and describe data. This chapter

### EXPERIMENT GRAPHING IN EXCEL

EXPERIMENT GRAPHING IN EXCEL Introduction In this lab you will learn how to use Microsoft Excel to plot and analyze data that you obtain while doing experiments. In this lab you learn how to Enter data

### Business Statistics & Presentation of Data BASIC MATHEMATHICS MATH0101

Business Statistics & Presentation of Data BASIC MATHEMATHICS MATH0101 1 STATISTICS??? Numerical facts eg. the number of people living in a certain town, or the number of cars using a traffic route each

### Selecting a Sub-set of Cases in SPSS: The Select Cases Command

Selecting a Sub-set of Cases in SPSS: The Select Cases Command When analyzing a data file in SPSS, all cases with valid values for the relevant variable(s) are used. If I opened the 1991 U.S. General Social

### User s Guide for Program CLAM (Classification Method)

Original Version (March, 2011) User s Guide for Program CLAM (Classification Method) by Anne Chao, National Tsing Hua University, Taiwan 30043 Shang-Yi Lin, National Tsing Hua University, Taiwan 30043

### Using SPSS 20, Handout 3: Producing graphs:

Research Skills 1: Using SPSS 20: Handout 3, Producing graphs: Page 1: Using SPSS 20, Handout 3: Producing graphs: In this handout I'm going to show you how to use SPSS to produce various types of graph.

### Entering data and doing repetitive calculations with Excel

Entering data and doing repetitive calculations with Excel Start by entering preliminary data in columns. Label each column. If you need to do repetitive calculations on your data before you make a graph,

### INTRODUCTION TO MICROSOFT ACCESS Tables, Queries, Forms & Reports

INTRODUCTION TO MICROSOFT ACCESS Tables, Queries, Forms & Reports Introduction...2 Tables...3 Designing a Table...3 Data Types...4 Relationships...8 Saving Object Designs and Saving Data...9 Queries...11

### Data selection and Queries in ArcGIS

Data selection and Queries in ArcGIS BASICS Whether you are selecting or querying data there are a minimum of 3 elements you will need; a field, an, operator and a value Field Operator Value "AREA" > 1500

### b) lower case always use lower case for all matlab commands. This is what matlab recognizes.

1 Matlab 1) Fundamentals a) Getting Help for more detailed help on any topic, typing help, then a space, and then the matlab command brings up a detailed page on the command or topic. For really difficult

### Creating Population Pyramids Using Microsoft Excel

Creating Population Pyramids Using Microsoft Excel Population pyramids are one of the most basic illustrative tools used in demography to show the age structure of a population. This document will show

### SECTION 2-1: OVERVIEW SECTION 2-2: FREQUENCY DISTRIBUTIONS

SECTION 2-1: OVERVIEW Chapter 2 Describing, Exploring and Comparing Data 19 In this chapter, we will use the capabilities of Excel to help us look more carefully at sets of data. We can do this by re-organizing

### 1.2 Using the GPG Gen key Command

Creating Your Personal Key Pair GPG uses public key cryptography for encrypting and signing messages. Public key cryptography involves your public key which is distributed to the public and is used to

### Elementary Statistics. Scatter Plot, Regression Line, Linear Correlation Coefficient, and Coefficient of Determination

Scatter Plot, Regression Line, Linear Correlation Coefficient, and Coefficient of Determination What is a Scatter Plot? A Scatter Plot is a plot of ordered pairs (x, y) where the horizontal axis is used

### Statistics Using the CFX-9850GB Plus Calculator Presented by Damian Freiberg and Phil Perkins, CASIO Bursary Students, QUT

Rationale Statistics Using the CFX-9850GB Plus Calculator Presented by Damian Freiberg and Phil Perkins, CASIO Bursary Students, QUT Both in the current junior and senior mathematics syllabuses statistical

### This activity will show you how to draw graphs of algebraic functions in Excel.

This activity will show you how to draw graphs of algebraic functions in Excel. Open a new Excel workbook. This is Excel in Office 2007. You may not have used this version before but it is very much the

### Syntax Menu Description Options Remarks and examples Stored results Methods and formulas Acknowledgments References Also see.

Title stata.com Syntax kdensity Univariate kernel density estimation Syntax Menu Description Options Remarks and examples Stored results Methods and formulas Acknowledgments References Also see kdensity

### STATS8: Introduction to Biostatistics. Data Exploration. Babak Shahbaba Department of Statistics, UCI

STATS8: Introduction to Biostatistics Data Exploration Babak Shahbaba Department of Statistics, UCI Introduction After clearly defining the scientific problem, selecting a set of representative members

### A Program for PCB Estimation with Altium Designer

A Program for PCB Estimation with Altium Designer By: Steve Hageman AnalogHome.com One thing that I have had to do over and over on my new PCB jobs is to make an estimate of how long I think the layout

### 021312 2009 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic, or

Import Guide 021312 2009 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic, or mechanical, including photocopying, recording,

### EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations. Excel is powerful tool and can make your life easier if you are proficient in using it. You will need to use Excel to complete most of your

### CGN 3421 - Computer Methods

CGN 3421 - Computer Methods Class web site: www.ce.ufl.edu/~kgurl Class text books: Recommended as a reference Numerical Methods for Engineers, Chapra and Canale Fourth Edition, McGraw-Hill Class software:

### Stata 12 Merging Guide. Nathan Favero Texas A&M University October 19, 2012

Nathan Favero Texas A&M University October 19, 2012 Contents Best Practices, pg. 3 Using Merge & Append, pg. 4 Merge, pg. 11 Append, pg. 14 Other Useful Commands, pg. 15 Importing Data into Stata, pg.

### Bank Account 1 September 2015

Chapter 8 Training Notes Bank Account 1 September 2015 BANK ACCOUNTS Bank Accounts, or Bank Records, are typically setup in PrintBoss after the application is installed and provide options to work with

### Texas Instruments TI-83, TI-83 Plus Graphics Calculator I.1 Systems of Linear Equations

Part I: Texas Instruments TI-83, TI-83 Plus Graphics Calculator I.1 Systems of Linear Equations I.1.1 Basics: Press the ON key to begin using your TI-83 calculator. If you need to adjust the display contrast,

### SPSS for Exploratory Data Analysis Data used in this guide: studentp.sav (http://people.ysu.edu/~gchang/stat/studentp.sav)

Data used in this guide: studentp.sav (http://people.ysu.edu/~gchang/stat/studentp.sav) Organize and Display One Quantitative Variable (Descriptive Statistics, Boxplot & Histogram) 1. Move the mouse pointer

### Stata Walkthrough 4: Regression, Prediction, and Forecasting

Stata Walkthrough 4: Regression, Prediction, and Forecasting Over drinks the other evening, my neighbor told me about his 25-year-old nephew, who is dating a 35-year-old woman. God, I can t see them getting

### Newton s First Law of Migration: The Gravity Model

ch04.qxd 6/1/06 3:24 PM Page 101 Activity 1: Predicting Migration with the Gravity Model 101 Name: Newton s First Law of Migration: The Gravity Model Instructor: ACTIVITY 1: PREDICTING MIGRATION WITH THE

### STATA FUNDAMENTALS FOR MIDDLEBURY COLLEGE ECONOMICS STUDENTS

STATA FUNDAMENTALS FOR MIDDLEBURY COLLEGE ECONOMICS STUDENTS BY EMILY FORREST AUGUST 2008 CONTENTS INTRODUCTION STATA SYNTAX DATASET FILES OPENING A DATASET FROM EXCEL TO STATA WORKING WITH LARGE DATASETS

### F nest. Financial Intermediation Network of European Studies. Data and Sample Management with Stata

F nest Financial Intermediation Network of European Studies S U M M E R S C H O O L Data and Sample Management with Stata Dr. Giovanni Cerulli 6 October 2015 (half day) University of Rome III, Italy Lecturer

### University of Southern California Marshall Information Services

University of Southern California Marshall Information Services Determine Breakeven Price Using Excel - Using Goal Seek, Data Tables, Vlookup & Charts This guide covers how to determine breakeven price

### GeoGebra Statistics and Probability

GeoGebra Statistics and Probability Project Maths Development Team 2013 www.projectmaths.ie Page 1 of 24 Index Activity Topic Page 1 Introduction GeoGebra Statistics 3 2 To calculate the Sum, Mean, Count,

### Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

### Module 3: Correlation and Covariance

Using Statistical Data to Make Decisions Module 3: Correlation and Covariance Tom Ilvento Dr. Mugdim Pašiƒ University of Delaware Sarajevo Graduate School of Business O ften our interest in data analysis

### Doing Multiple Regression with SPSS. In this case, we are interested in the Analyze options so we choose that menu. If gives us a number of choices:

Doing Multiple Regression with SPSS Multiple Regression for Data Already in Data Editor Next we want to specify a multiple regression analysis for these data. The menu bar for SPSS offers several options:

### Exploratory Data Analysis with One and Two Variables

Exploratory Data Analysis with One and Two Variables Instructions for Lab #2 Statistics 111- Probability and Statistical Inference Lab Objective To explore data with histograms and scatter plots. Review

### Getting started with qplot

Chapter 2 Getting started with qplot 2.1 Introduction In this chapter, you will learn to make a wide variety of plots with your first ggplot2 function, qplot(), short for quick plot. qplot makes it easy

### 10 Listing data and basic command syntax

10 Listing data and basic command syntax Command syntax This chapter gives a basic lesson on Stata s command syntax while showing how to control the appearance of a data list. As we have seen throughout

### Creating a Documentation Template

Creating a Documentation Template Faculty, thank you for taking the time to learn how to build your own documentation templates and notes in the Neehr Perfect EHR. This Guide also acts as a step-by-step

### Density Distribution Sunflower Plots

Density Distribution Sunflower Plots William D. Dupont* and W. Dale Plummer Jr. Vanderbilt University School of Medicine Abstract Density distribution sunflower plots are used to display high-density bivariate

Trade Flows and Trade Policy Analysis October 2013 Dhaka, Bangladesh Witada Anukoonwattaka (ESCAP) Cosimo Beverelli (WTO) 1 Introduction to STATA 2 Content a. Datasets used in Introduction to Stata b.

### 4. Describing Bivariate Data

4. Describing Bivariate Data A. Introduction to Bivariate Data B. Values of the Pearson Correlation C. Properties of Pearson's r D. Computing Pearson's r E. Variance Sum Law II F. Exercises A dataset with

### Exercise 1.12 (Pg. 22-23)

Individuals: The objects that are described by a set of data. They may be people, animals, things, etc. (Also referred to as Cases or Records) Variables: The characteristics recorded about each individual.

### Data Analysis Tools. Tools for Summarizing Data

Data Analysis Tools This section of the notes is meant to introduce you to many of the tools that are provided by Excel under the Tools/Data Analysis menu item. If your computer does not have that tool

### Getting started in Excel

Getting started in Excel Disclaimer: This guide is not complete. It is rather a chronicle of my attempts to start using Excel for data analysis. As I use a Mac with OS X, these directions may need to be

### Importing and Exporting With SPSS for Windows 17 TUT 117

Information Systems Services Importing and Exporting With TUT 117 Version 2.0 (Nov 2009) Contents 1. Introduction... 3 1.1 Aim of this Document... 3 2. Importing Data from Other Sources... 3 2.1 Reading

### CSU, Fresno - Institutional Research, Assessment and Planning - Dmitri Rogulkin

My presentation is about data visualization. How to use visual graphs and charts in order to explore data, discover meaning and report findings. The goal is to show that visual displays can be very effective

### Programming in Access VBA

PART I Programming in Access VBA In this part, you will learn all about how Visual Basic for Applications (VBA) works for Access 2010. A number of new VBA features have been incorporated into the 2010

### GUIDE TO REDCAP EXPORTED FILES

GUIDE TO REDCAP EXPORTED FILES UNDERSTANDING DATA FORMATS AND LOADING DATA INTO ANALYSIS SOFTWARE INTRODUCTION At some point in time in the course of your REDCap project, you will need to export your data

### Basics of STATA. 1 Data les. 2 Loading data into STATA

Basics of STATA This handout is intended as an introduction to STATA. STATA is available on the PCs in the computer lab as well as on the Unix system. Throughout, bold type will refer to STATA commands,

### Can SAS Enterprise Guide do all of that, with no programming required? Yes, it can.

SAS Enterprise Guide for Educational Researchers: Data Import to Publication without Programming AnnMaria De Mars, University of Southern California, Los Angeles, CA ABSTRACT In this workshop, participants

### Calculator Notes for the TI-Nspire and TI-Nspire CAS

CHAPTER 1 Calculator Notes for the Note 1A: Reentry If you are not currently in the Calculator application, press c and choose Calculator. Evaluate an expression. To perform an operation on the result

### Drawing a histogram using Excel

Drawing a histogram using Excel STEP 1: Examine the data to decide how many class intervals you need and what the class boundaries should be. (In an assignment you may be told what class boundaries to

### Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries

Exploring Microsoft Office Access 2007 Chapter 2: Relational Databases and Multi-Table Queries 1 Objectives Design data Create tables Understand table relationships Share data with Excel Establish table

### OVERVIEW OF R SOFTWARE AND PRACTICAL EXERCISE

OVERVIEW OF R SOFTWARE AND PRACTICAL EXERCISE Hukum Chandra Indian Agricultural Statistics Research Institute, New Delhi-110012 1. INTRODUCTION R is a free software environment for statistical computing

### The KaleidaGraph Guide to Curve Fitting

The KaleidaGraph Guide to Curve Fitting Contents Chapter 1 Curve Fitting Overview 1.1 Purpose of Curve Fitting... 5 1.2 Types of Curve Fits... 5 Least Squares Curve Fits... 5 Nonlinear Curve Fits... 6