Have you signed up (or had) your meeting?

Slides:



Advertisements
Similar presentations
CATHERINE AND ANNIE Python: Part 3. Intro to Loops Do you remember in Alice when you could use a loop to make a character perform an action multiple times?
Advertisements

1) Terms to Know 2) Starting an Office 97 Application 8) Finding a missing file 7)File Managment 4) Utilizing the Right Mouse Button 6) Using Help 3)
Chapter 3 – Fundamental Statements
VARIABLES AND DEBUGGING Beginning Programming. Assignment Statements  Used to hold values in a variable  Calculates a result and stores it in a variable.
Introduction to Excel Formulas, Functions and References.
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
School of Computing Science CMT1000 Ed Currie © Middlesex University Lecture 4: 1 CMT1000: Introduction to Programming Ed Currie Lecture 5a: Input and.
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
1 Software John Sum Institute of Technology Management National Chung Hsing University.
Lesson 4 Cell Reference Formulas. Working with Cell References continued… Relative Cell Reference A relative cell reference means that the cell value.
CS140: Intro to CS An Overview of Programming in C by Erin Chambers.
First Steps Log in correctly based on whether you are at school or at home HOMESCHOOL At Windows screen, to log in to the computer: User name: nwcsdUser.
CH Programming An introduction to programming concepts.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
ISU Basic SAS commands Laboratory No. 1 Computer Techniques for Biological Research Animal Science 500 Ken Stalder, Professor Department of Animal Science.
Getting Started with MATLAB (part2) 1. Basic Data manipulation 2. Basic Data Understanding 1. The Binary System 2. The ASCII Table 3. Creating Good Variables.
Basics of Biostatistics for Health Research Session 1 – February 7 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
Files: By the end of this class you should be able to: Prepare for EXAM 1. create an ASCII file describe the nature of an ASCII text Use and describe string.
HRP Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is protected by copyright law and.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
1 MATERI PENDUKUNG TIPE DATA Matakuliah: M0074/PROGRAMMING II Tahun: 2005 Versi: 1/0.
1.1: Objects and Classes msklug.weebly.com. Agenda: Attendance Let’s get started What is Java? Work Time.
If you don’t have Google Earth downloaded already, you can go to to get it.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Data Entry, Coding & Cleaning SPSS Training Thomas Joshua, MS July, 2008.
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
JavaScript Part 1 Introduction to scripting The ‘alert’ function.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
CS 106 Computing Fundamentals II Chapter 5 “Excel Basics for Windows”
More about comments Review Single Line Comments The # sign is for comments. A comment is a line of text that Python won’t try to run as code. Its just.
Computer Information Technology Section 6-17
QM222 Class 13 Section D1 Omitted variable bias (Chapter 13.)
Introduction to Python Data Types and Variables
Chapter 2 Assignment and Interactive Input
Stats Lab #1 TA: Kyle Davis
QS101 – Introduction to Quantitative Methods in Social Science Week 2: Introduction to Stata and Preparation of Field Work Florian Reiche Teaching Fellow.
QM222 A1 More on Excel QM222 Fall 2017 Section A1.
Other Kinds of Arrays Chapter 11
QM222 Class 8 Section A1 Using categorical data in regression
QM222 A1 Visualizing data using Excel graphs
Intro to PHP & Variables
Objectives Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event.
Introduction Introduction to Stata 2016.
Variables and Arithmetic Operations
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Variables In programming, we often need to have places to store data. These receptacles are called variables. They are called that because they can change.
Software John Sum Institute of Technology Management
Conditions and Ifs BIS1523 – Lecture 8.
Introduction to Stata Spring 2017.
Introduction to SAS A SAS program is a list of SAS statements executed in order Every SAS statement ends with a semicolon! SAS statements can be in caps.
Items, Group Boxes, Check Boxes & Radio Buttons
Introduction to TouchDevelop
Hello World! Syntax.
CHAPTER FOUR VARIABLES AND CONSTANTS
Chapter 3: Selection Structures: Making Decisions
Functions continued.
Have you signed up (or had) your meeting?
Chapter 3: Selection Structures: Making Decisions
Unit 3: Variables in Java
Running a Java Program using Blue Jay.
Variables and Constants
Hardware is… Software is…
Chapter 2 Excel Extension: Now You Try!
Presentation transcript:

Have you signed up (or had) your meeting? QM222 Class 5 Section A1 Using Stata – Basics and inputting Data (see Chapter 28 and 29) Assignment 1 due Monday – in class, or under my office door (518C), or in my mailbox (531) Have you signed up (or had) your meeting? QM222 Fall 2017 Section A1

Today’s Agenda Background on Computers and Data Types Missing Values In-Class Exercise on: the Stata screen reading in different kinds of data sets into Stata a variable of commands to describe the data Keeping a log of what you have done Some additional basic commands for looking at the data, editing the data, creating new variables (including if statements) QM222 Fall 2017 Section A1

Background on Computers and Data Types Some data is numbers that computer saves as numbers. Computer programs can use these variables in calculations. Some data has non-numerical characters. Computer programs call these strings. Computer programs cannot use these in calculations. However, in Stata or Excel, when you want to refer to a value of a string variable, you need to put it in quotation marks, e.g. “government”. This string is different than “Government” because one character (g v. G) is different. If a variable has a single observation that is non-numerical, Stata will consider it a string. Let’s say there is a typo so one observation has a letter but all the rest are numbers. You can correct this observation, and then tell Stata to consider this a numerical variable (with a destring command). QM222 Fall 2017 Section A1

Background on Data Types: Missing values If you are missing a value for one observation of a variable, the computer cannot use this observation in calculations. Stata has a special code for missing values for a numerical variable, a period (.) Stata has a special code for missing values for a string variable, two quotation marks with nothing in between ““ However, sometimes Excel considers an empty cell as a zero (in calculations). Data sets like surveys use their own codes to signify missing values. They might use a ridiculous number like -9 for age. Before you can use this variable in calculations, you need to change this to a . Or they might use a string like “na” for a missing value. Before you can use this variable in calculations, you need to change this to a . AND then tell Stata that the variable is now numeric. QM222 Fall 2017 Section A1

The Stata Screen has several windows Results window Review window Variables window Properties window Command window QM222 Fall 2017 Section A1

You can change windows’ dimensions by dragging edges, or click window to change what shows up Results window Review window Variables window Properties window Command window QM222 Fall 2017 Section A1

A few things to remember The help icon (or just typing help or help topic) is very useful. You can click icons, click on menus, or type commands. Stata usually accepts the first few letters of a typed command (as long as this is the only command that starts with these letters.) In variable names, Stata cares about capital letters. The variable Education is not the same as the variable education. Suggestion: always use lower case for variable names. Stata commands can only be typed in lower case. Stata will not let you open a new data set if you already have one open. Only one can be opened at a time. QM222 Fall 2017 Section A1

Logical (if) statements Many commands in Stata can be applied to a subset of the data only with an if statement. “If” statements are also called logical statements. In Stata logical statements (only), you can use these “operators”: == ( double equal signs) equals (use in logical statements only) & and | or != not equal to < > <= >= obvious Example: sum wagp if agep>=25 If you have a comma in your command (e.g. sum varname, detail), put the if statement before the comma: sum wagp if agep>=25, detail QM222 Fall 2017 Section A1