Introduction to STATA 6.0 ECONOMICS 626

Size: px
Start display at page:

Download "Introduction to STATA 6.0 ECONOMICS 626"

Transcription

1 Introduction to STATA 6.0 ECONOMICS 626 Bill Evans Fall 2001 This handout gives a very brief introduction to STATA 6.0 on the Economics Department Network. In a few short years, STATA has become one of the leading programs used by researchers in applied micro economics. STATA was written by a labor economists and it contains many econometric procedures (fixed-effects, two-stage least squares, sample selection correction, quantile regressions, probit/logit, etc.) used in the analysis of cross-sectional data. It is fast and relatively easy to use. STATA s speed advantage comes from the fact that all data is loaded into RAM. Subsequently, the amount of high memory restricts the size of the problem. Given the size of the data sets we will use in class and the available memory on department machines, this should not prove to be much of a constraint. Some projects are however just too big for STATA. For example, one of our graduate students is using the Natality Detail data for the years The Detail data contain a census of all births in the US, or about 4 million observations per year. With a data set of 32 million observations, this project is only feasible in STATA if the host machine has about 1 GIG of RAM. Most machines do not have this much RAM so for problems of this magnitude, other programs like SAS may be preferred. All the STATA data files, sample programs, data dictionaries and results for this class can be found on the network drive h:\econ626\stata. These programs can be accessed once you log onto the Economics Department Network. For those with access to a department machine but no permanent network account, you can log onto the network as a guest using temp as your login ID and economics as the password. Sample programs and data files are also located on the class web page The output from the sample programs in this handout will be written to an external file. The files are written by default to the active subdirectory. I will illustrate below how to change the subdirectory once in STATA. First, however you must construct a local subdirectory for the results. Using WINDOWS EXPLORER or a DOS window, create a subdirectory on d: called ECON626. Please do not write files to the class subdirectory or a permanent network drive. Use either the local driver or the temporary drive t:\ for results. If you use a local drive, please delete results when you have finished using them. Once you construct the subdirectory for temporary output, Load h:\econ626\stata\cps87.do and h:\econ626\stata\cps87.dct into your favorite ASCII text editor, or going to the web, call these programs up in your favorite browser. We will look at these programs in a moment. Getting onto STATA STATA can be accessed through the Departments Network. From START, go APPLICATIONS NETWORK MENU, STATISTICS PROGRAMS, STATA 6.0. Once in STATA, you will notice 4 windows. The small window at the bottom is where commands will be typed that execute programs, generate descriptive statistics, etc. The box labeled Review contains a history of the programing statements executed by STATA in this current session. The box at the bottom left contains a list of all the variables currently loaded into memory. Once you execute a program, the results from the exercise will 1

2 scroll through the large black box in the middle of the page. STATA can be run interactive or programs can be submitted in batch format. In this handout, we will use a linear combination of these two procedures. A Basic STATA program From the command line, you can write individual lines of code that read data, get means, etc. In this example, we will instead execute an existing program. Executable STATA programs are called DO files and must be written in ASCII format and file names must end with the.do extension. I have written a sample program that illustrates many of the basic features of STATA. The program is called h:\econ626\stata\cps87.do. Click on your ASCII text editor and bring up the program on the screen. Alternatively, a copy of the program is included in Appendix D. This program illustrates 5 basic features of STATA. How to: M M M M M read raw data into STATA format construct new variables generate descriptive statistics run a simple regression output results to a LOG file Throughout the program, there will be two types of lines. The first is a comment that is a non-executable statement that begins with a star (*). These lines are programing directions that supply the program reader with a road map of what the author is trying to accomplish. The second line type are executable STATA commands. At the top of the program are a few commands that configure STATA for our use. The first line tells STATA that the semicolon (;) will be used to indicate the end of line. Because we delimit line with (;), commands can be written over more than one line. The next statement indicates the amount of RAM to use for data. In this case, we are using 10 meg of RAM. For larger problems you will need to increase RAM use. Results generated from the command line will be printed in the black box in the middle of the screen. If you want to save the results from your current STATA session, you must open a LOG file. The line log using c:\econ626\cps87,replace; opens a file called cps87.log on d:\econ626 subdirectory. If no directory is specified, the file will be written to the active subdircteory. The replace option tells STATA to over write any previous version of the file. At the end of the program, I CLOSE this file. Reading raw data into STATA For most empirical projects, you will receive data in some format like ASCII, and you must put the data into a STATA data file. This is accomplished through the use of data dictionaries. A dictionary defines where the raw data is stored, the variables in the data set, the type of variable (integer, scientific notation, etc.), and a short variable description called a label. The syntax for data dictionaries is illustrated in the file h:\econ626\stata\cps87.dct and a copy of the dictionary is listed in Appendix C. If you have not 2

3 already done so, please load this file into an ASCII text editor. The first line in the data dictionary defines the name of the file and where raw data is located. If no subdirectory is given, STATA assumes the raw file is located in the active subdirectory. The raw data file is called h:\econ626\stata\cps87.raw. The data file is a matrix with 7 columns and roughly 19,000 rows. Each row represents data for another observation (person) and each column is a new variable. The first 10 observations from this data are listed in Appendix A and the variables are defined in detail in Appendix B. The raw data is stored in space-delimited format which means variables are separated by spaces. By listing 7 variables in the data dictionary, STATA assumes that there are 7 unique variables per observation. With space-delimited text, the computer reads strings of numbers until it finds a space. The first number is variable 1, observation 1, the second is variable 2, observation 1, etc. In this instance, you must list the same number of variables in the data dictionary as in the data set. If there are 7 variables (A,B..G) in the data set but only 4 variables are listed (A,B,C,D) in the data dictionary, STATA will read the first 4 variables into observations 1 (A..D), then assume variables E,F,G and A from the next observation are the fours variables for observation 2. Variable names must be 8 or fewer characters, names must begin with a letter or an underscore _, and numbers can used in all but the first position. The data dictionary is referenced in the STATA DO program by the line. infile using h:\econ626\stata\cps87; Just a note about the data set. The data for this project comes from the 1987 Current population Survey (CPS). The CPS is a monthly survey of about 60,000 US households and it is the Federal Government s source of basic labor market data such as the monthly unemployment rate. Households are in the survey for the same 4 months in a two-year cycle. One quarter of the survey leaves the sample temporarily (month 4) or permanently (month 8). This group is called the out-going rotation sample. These individuals are asked a set of detailed questions about their job such as the amount and method of payment (salary of hourly), usual weekly hours and whether they belong to a union. From these responses, one can construct usual weekly hours of work. The sample we will use consists of a 25 percent random sample of male full time (30 or more hours per week) workers. Space-delimited data is the easiest type of text to read into a STATA data file. However, most data sets are packed which means that variables fill specified columns and there are no blank spaces between variables. For example, consider the following 7 lines from a data set. 58FB MW MB FW MW FW MW

4 In this case, columns 1-2 measure age, column 3 is sex, column 4 is race, and columns 8-9 are weeks worked in the previous year. To read this type of data into STATA, use column pointers that tell STATA to look on columns 1-2 for age, column 3 for sex, etc. Using pointers is beyond this simple example but such topics are discussed in the STATA manuals. STATA automatically stores all variables in single-precision (8-bit) unless otherwise specified. For example, a variable that equals 1 or 0 will be store as or Single-precision is overkill for many variables since they only occupy less than 8 spaces. Once raw data has been read into STATA, it is good programing practice to COMPRESS the data, which means STATA stores the information in the most efficient format. For example, UNIONM is a one-character variable (1 or 2). COMPRESS will store the variable as a 1 digit integer, freeing-up 7 bits of storage.` GENerating new variables in STATA Additional variables can easily be created with the GEN command. The syntax for GEN is gen new variable name=mathematic expression; Below are six lines that construct new variables. gen age2=age*age; gen earnwkl=ln(earnwke); gen union=unionm==1; gen topcode=earnwke==999; gen nonwhite=((race==2) (race==3)); gen big_ne=((region==1)&(smsa==1)); The first two lines use standard mathematical operators to construct new variables. One of the most common variables in applied work is a dummy variable that equals 1 or 0, separating people into two groups (male or female, black or white, etc). These variables are easy to construct with the use of logical operators. Logical operators are of the form GEN Y=(logical statement) that construct a new variable Y that equals 1 when the logical statement is true and zero otherwise. The next four variables demonstrate how to use logical operators. In the first two, we construct a variable that equals 1 for union members, or a variable that equals 1 for top-coded wages. Notice that two equal signs must be used when exact equality is indicated in a logical statement. Combinations of logical statements can be used to construct dummy variables. The verticle line represents or and the & sign represent and. The variable NONWHITE equals 1 if races equals 1 OR 2, and BIG_NE equals 1 if a respondent comes from a big SMSA from the Northeast census region. After the variables are constructed, I add a set of variable LABELs. The syntax for labels is illustrated in the next six lines. label var age2 "age squared"; 4

5 label var earnwkl "log earnings per week"; label var topcode "=1 if earnwkl is topcoded"; label var union "1=in union, 0 otherwise"; label var nonwhite "1=nonwhite, 0=white" ; label var big_ne "1= live in big smsa from northeast, 0=otherwsie"; compress; Once the new variables are constructed, I compress the data set again. You will notice throughout the program there are numerous MORE; commands. Results from the program will scroll on the screen. The MORE; command pauses until a hard return is issued. This allows you to examine output on the fly. Getting descriptive statistics Once you have the correct collection of variables in you STATA data file, you may want to construct some simple descriptive statistics. For example, you can ask to DESCribe the data in your STATA file. Summary statistics (mean, min, max and standard deviation) are produced with the SUM; command. If you want more detailed information on a particular variable (quantiles, medians, skewness, kurtosis, etc.), use the SUM command, list the variables, and ask for DETAILed calculations. You can obtain complete distributions for discrete variables by using the TABULATE command. You can construct two-way contingency tables by listing the two variables in the TABULATE command. For example, in the line tabulate region smsa, row column; STATA will count the number of observations for all 12 unique groups of region and SMSA. The row and column options to the command tell STATA to produce row and column totals. Running a simple OLS regression The most-often estimated model in labor economics, if not all of economics is the standard human capital earnings function. Log weekly wages has been shown to be roughly linear in education and quadratic in income. In the next few lines, we run a simple OLS regression. The syntax of a regression is simple where the first variable after REG is the dependent variable and all other variables are independent variables. In this example, there are five covariates. STATA automatically adds a constnat to every model unless otherwise specified. In many empirical models, observations can be grouped into discrete categories. Sometimes, the number of categories is small (e.g., race and sex) Sometimes the categories are numerous (states and countries). In a sample with people from 50 states, to add state dummy variables requires the construction of 49 variables. STATA has an automated procedure that will construct the discrete variables and add them to a model. Before the REG command is invoked, the XI option signals to STATA that the variables defined by i.name. 5

6 Submitting the sample program We can execute the sample DO program from the command line by typing do h:\econ626\stata\cps87 and hitting RETURN. Notice that as the program executes, the results pause until a hard return is issued. Once the program completes, the log is closed and the results are written to an external file. The variables are however still in active memory, so by typing SUM and hitting return, sample means return to the results window. Typing TABLULATE EDUC and hitting return generates the distribution of education. Note however that because the log is closed, the results are not written to disk. The data set constructed by this program is still active. Looking at the VARIABLES window, you see a list of variables that are active in the data set. Scroll down to the bottom of the window, then return to the STATA command line. Type in the following commands, hitting return after you type. gen bigcity=smsa==1 Notice that the variable BIGCITY has now been added to the data file. Type in the next line, hitting return afterwards label var bigcity "live in top 19 smsa" and you notice this label is added to the variable list. Now that you have anew variable, you can use it in your work. For example, you can sort the data by bigcity by typing the following line sort bigcity then hitting return. Once we have the data sorted by bigcity, we can get mean log weekly earnings by city size by typing by bigcity: sum earnwkl You see that mean log earnings are 6.00 outside of big SMSAs and 6.18 in the top 19 SMSAs. As another example, we can sort the data by race by typing sort race and hitting return, then run human capital earnings regressions by race by race: reg earnwkl educ age age2 You see that the rate of return to education is 6.9% for whites, 7.5% for blacks, and 5.58% for Hispanics. Handling errors 6

7 If your program has errors, enter and ASCII editor then edit and save the program. You will need to close an open log from the command line by typing LOG CLOSE and CLEAR any active variables in memory. You are then ready to re-run your program. If you hit the page up key, you will notice that previously-entered commands appear in the command line. This is a quick way of recalling lines of code. Getting online help This program illustrates a small fraction of the procedures and capabilities of STATA. For example, from the toolbar at the top of the window, clink on HELP then SEARCH. Type OLS then hit return. The output from this search lists all procedures that utilize an OLS model. Go down to about the seventh entry and click on the red REGRESS. Here is the syntax for the regression procedure. In this section you learn that to run a regression for only whites, we type reg earnwkl educ age age2 union if race==1 or you want robust standard errors, we type reg earnwkl educ age age2 union, robust Exiting STATA To exit STATA, please do to the command line, type CLEAR and hit return which clears all variables from memory, then type EXIT and hit return. Please delete the d:\econ626 subdirectory from the local drive. 7

8 Appendix A 1 st 10 observations from h:\econ626\stata\cps87.raw Variable Positions h:\econ626\stata\cps87.raw age race education union smsa region weekly earnings

9 Appendix B Detailed Variable Definitions h:\econ626\stata\cps87.raw Variable AGE RACE Definition Age in years =1 if white, non hispanic, =2 id black, non hispanic, =3 if hispanic EDUC Years of completed education, top-coded at 18. UNIONM SMSA REGION =1 if a uion member, =2 otherwise =1 if live in one of 19 largest Standard metropolitan Statistical Areas (SMSA), =2 if live in other SMSA, =3 if live in non-smsa =1 if live in Northeast, =2 if live in Midwest, =3 if live in South, =4 if live in West EARNWKE Usual weekly earnings, nominal 1987 dollars, top-coded at $999 Appendix C Contents of h:\econ626\stata\cps87.dct STATA Data Dictionary dictionary using h:\eccon626\stata\cps87.raw{ age "age in years" race "1=white, non-hisp, 2=black, n.h, 3=hisp" educ "years of education" unionm "1=union member, 2=otherwise" smsa "1=live in 19 largest smsa, 2=other smsa, 3=non smsa" region "1=east, 2=midwest, 3=south, 4=west" earnwke "usual weekly earnings" } 9

10 Appendix D h:\econ626\stata\cps87.do * this line defines the semicolon as the line delimiter; # delimit ; * set memory for 10 meg; set memory 10m; * write results to a log file; * please do not write files to permanent; * network drives or the class subdirectory; * write results to a subdirectory on t:\; * or local drives; log using c:\econ626\cps87,replace; *read in raw data; infile using h:\econ626\stata\cps87; * compress saves data in efficient manner; * turning double precision values into integer, etc; compress; * generate new variables; * lines 1-2 illustrate basic math functoins; * lines 3-4 line illustrate logical operators; * line 5 illustrate the OR statement; * line 6 illustrates the AND statement; * after you construct new variables, compress the data again; gen age2=age*age; gen earnwkl=ln(earnwke); gen union=unionm==1; gen topcode=earnwke==999; gen nonwhite=((race==2) (race==3)); gen big_ne=((region==1)&(smsa==1)); label var age2 "age squared"; label var earnwkl "log earnings per week"; label var topcode "=1 if earnwkl is topcoded"; label var union "1=in union, 0 otherwise"; label var nonwhite "1=nonwhite, 0=white" ; label var big_ne "1= live in big smsa from northeast, 0=otherwise"; compress; * the more command pauses the screen until a hard return is issued; more; * list variables and labels in data set; desc; more; * get descriptive statistics; 10

11 sum; more; * get detailed statistics for continuous variables; sum earnwke, detail; more; * get frequencies of discrete variables; tabulate unionm; tabulate race; more; * get two-way table of frequencies; tabulate region smsa, row column; more; *run simple regression; reg earnwkl age age2 educ nonwhite union; more; * run regression adding smsa, region and race fixed-effects; xi: reg earnwkl age age2 educ union i.race i.region i.smsa; more; * close log file; log close; 11

12 Results h:\econ626\stata\cps87.log. *read in raw data;. infile using h:\econ626\stata\cps87; dictionary using h:\econ626\stata\cps87.raw{ age "age in years" race "1=white, non-hisp, 2=black, n.h, 3=hisp" educ "years of education" unionm "1=union member, 2=otherwise" smsa "1=live in 19 largest smsa, 2=other smsa, 3=non smsa" region "1=east, 2=midwest, 3=south, 4=west" earnwke "usual weekly earnings" } (19906 observations read). * compress saves data in efficient manner;. * turning double precision values into integer, etc;. compress; age was float now byte race was float now byte educ was float now byte unionm was float now byte smsa was float now byte region was float now byte earnwke was float now int. * generate new variables;. * lines 1-2 illustrate basic math functoins;. * lines 3-4 line illustrate logical operators;. * line 5 illustrate the OR statement;. * line 6 illustrates the AND statement;. * after you construct new variables, compress the data again;. gen age2=age*age;. gen earnwkl=ln(earnwke);. gen union=unionm==1;. gen topcode=earnwke==999;. gen nonwhite=((race==2) (race==3));. gen big_ne=((region==1)&(smsa==1));. label var age2 "age squared";. label var earnwkl "log earnings per week";. label var topcode "=1 if earnwkl is topcoded";. label var union "1=in union, 0 otherwise";. label var nonwhite "1=nonwhite, 0=white" ;. label var big_ne "1= live in big smsa from northeast, 0=otherwsie";. compress; age2 was float now int union was float now byte topcode was float now byte nonwhite was float now byte big_ne was float now byte 12

13 . * the more command pauses the screen until a hard return is issued;. more;. * list variables and labels in data set;. desc; Contains data obs: 19,906 vars: 13 size: 437,932 (95.8% of memory free) age byte %9.0g age in years 2. race byte %9.0g 1=white, non-hisp, 2=black, n.h, 3=hisp 3. educ byte %9.0g years of education 4. unionm byte %9.0g 1=union member, 2=otherwise 5. smsa byte %9.0g 1=live in 19 largest smsa, 2=other smsa, 3=non smsa 6. region byte %9.0g 1=east, 2=midwest, 3=south, 4=west 7. earnwke int %9.0g usual weekly earnings 8. age2 int %9.0g age squared 9. earnwkl float %9.0g log earnings per week 10. union byte %9.0g 1=in union, 0 otherwise 11. topcode byte %9.0g =1 if earnwkl is topcoded 12. nonwhite byte %9.0g 1=nonwhite, 0=white 13. big_ne byte %9.0g 1= live in big smsa from northeast, 0=otherwsie Sorted by: Note: dataset has changed since last saved. more;. * get descriptive statistics;. sum; Variable Obs Mean Std. Dev. Min Max age race educ unionm smsa region earnwke age earnwkl union topcode nonwhite big_ne more; 13

14 . * get detailed descriptics for continuous variables;. sum earnwke, detail; usual weekly earnings Percentiles Smallest 1% % % Obs % Sum of Wgt % 449 Mean Largest Std. Dev % % Variance % Skewness % Kurtosis more;. * get frequencies of discrete variables;. tabulate unionm; 1=union member, 2=otherwise Freq. Percent Cum Total tabulate race; 1=white, non-hisp, 2=place, n.h, 3=hisp Freq. Percent Cum Total more;. * get two-way table of frequencies;. tabulate region smsa, row column; 1=east, 2=midwest, 1=live in 19 largest smsa, 3=south, 2=other smsa, 3=non smsa 4=west Total

15 Total more;. *run simple regression;. reg earnwkl age age2 educ nonwhite union; Source SS df MS Number of obs = F( 5, 19900) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = earnwkl Coef. Std. Err. t P> t [95% Conf. Interval] age age educ nonwhite union _cons more;. * run regression addinf smsa, region and race fixed-effects;. xi: reg earnwkl age age2 educ union i.race i.region i.smsa; i.race Irace_1-3 (naturally coded; Irace_1 omitted) i.region Iregio_1-4 (naturally coded; Iregio_1 omitted) i.smsa Ismsa_1-3 (naturally coded; Ismsa_1 omitted) Source SS df MS Number of obs = F( 11, 19894) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE =

16 earnwkl Coef. Std. Err. t P> t [95% Conf. Interval] age age educ union Irace_ Irace_ Iregio_ Iregio_ Iregio_ Ismsa_ Ismsa_ _cons more;. * close log file;. log close 16

I Launching and Exiting Stata. Stata will ask you if you would like to check for updates. Update now or later, your choice.

I Launching and Exiting Stata. Stata will ask you if you would like to check for updates. Update now or later, your choice. I Launching and Exiting Stata 1. Launching Stata Stata can be launched in either of two ways: 1) in the stata program, click on the stata application; or 2) double click on the short cut that you have

More information

Introduction to Stata Toy Program #1 Basic Descriptives

Introduction to Stata Toy Program #1 Basic Descriptives Introduction to Stata 2018-19 Toy Program #1 Basic Descriptives Summary The goal of this toy program is to get you in and out of a Stata session and, along the way, produce some descriptive statistics.

More information

Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors

Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors (Section 5.4) What? Consequences of homoskedasticity Implication for computing standard errors What do these two terms

More information

/23/2004 TA : Jiyoon Kim. Recitation Note 1

/23/2004 TA : Jiyoon Kim. Recitation Note 1 Recitation Note 1 This is intended to walk you through using STATA in an Athena environment. The computer room of political science dept. has STATA on PC machines. But, knowing how to use it on Athena

More information

Econ Stata Tutorial I: Reading, Organizing and Describing Data. Sanjaya DeSilva

Econ Stata Tutorial I: Reading, Organizing and Describing Data. Sanjaya DeSilva Econ 329 - Stata Tutorial I: Reading, Organizing and Describing Data Sanjaya DeSilva September 8, 2008 1 Basics When you open Stata, you will see four windows. 1. The Results window list all the commands

More information

Recoding and Labeling Variables

Recoding and Labeling Variables Updated July 2018 Recoding and Labeling Variables This set of notes describes how to use the computer program Stata to recode variables and save them as new variables as well as how to label variables.

More information

Dr. Barbara Morgan Quantitative Methods

Dr. Barbara Morgan Quantitative Methods Dr. Barbara Morgan Quantitative Methods 195.650 Basic Stata This is a brief guide to using the most basic operations in Stata. Stata also has an on-line tutorial. At the initial prompt type tutorial. In

More information

After opening Stata for the first time: set scheme s1mono, permanently

After opening Stata for the first time: set scheme s1mono, permanently Stata 13 HELP Getting help Type help command (e.g., help regress). If you don't know the command name, type lookup topic (e.g., lookup regression). Email: tech-support@stata.com. Put your Stata serial

More information

. predict mod1. graph mod1 ed, connect(l) xlabel ylabel l1(model1 predicted income) b1(years of education)

. predict mod1. graph mod1 ed, connect(l) xlabel ylabel l1(model1 predicted income) b1(years of education) DUMMY VARIABLES AND INTERACTIONS Let's start with an example in which we are interested in discrimination in income. We have a dataset that includes information for about 16 people on their income, their

More information

Introduction to Stata: An In-class Tutorial

Introduction to Stata: An In-class Tutorial Introduction to Stata: An I. The Basics - Stata is a command-driven statistical software program. In other words, you type in a command, and Stata executes it. You can use the drop-down menus to avoid

More information

Stata v 12 Illustration. First Session

Stata v 12 Illustration. First Session Launch Stata PC Users Stata v 12 Illustration Mac Users START > ALL PROGRAMS > Stata; or Double click on the Stata icon on your desktop APPLICATIONS > STATA folder > Stata; or Double click on the Stata

More information

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata..

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata.. Stata version 13 January 2015 I- Launching and Exiting Stata... 1. Launching Stata... 2. Exiting Stata.. II - Toolbar, Menu bar and Windows.. 1. Toolbar Key.. 2. Menu bar Key..... 3. Windows..... III -...

More information

STAT:5400 Computing in Statistics

STAT:5400 Computing in Statistics STAT:5400 Computing in Statistics Introduction to SAS Lecture 18 Oct 12, 2015 Kate Cowles 374 SH, 335-0727 kate-cowles@uiowaedu SAS SAS is the statistical software package most commonly used in business,

More information

Stata versions 12 & 13 Week 4 Practice Problems

Stata versions 12 & 13 Week 4 Practice Problems Stata versions 12 & 13 Week 4 Practice Problems SOLUTIONS 1 Practice Screen Capture a Create a word document Name it using the convention lastname_lab1docx (eg bigelow_lab1docx) b Using your browser, go

More information

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT

TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT PRIMER FOR ACS OUTCOMES RESEARCH COURSE: TYPES OF VARIABLES, STRUCTURE OF DATASETS, AND BASIC STATA LAYOUT STEP 1: Install STATA statistical software. STEP 2: Read through this primer and complete the

More information

Week 4: Simple Linear Regression II

Week 4: Simple Linear Regression II Week 4: Simple Linear Regression II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Algebraic properties

More information

BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA

BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA Learning objectives: Getting data ready for analysis: 1) Learn several methods of exploring the

More information

Introduction to Stata - Session 2

Introduction to Stata - Session 2 Introduction to Stata - Session 2 Siv-Elisabeth Skjelbred ECON 3150/4150, UiO January 26, 2016 1 / 29 Before we start Download auto.dta, auto.csv from course home page and save to your stata course folder.

More information

Review of Stata II AERC Training Workshop Nairobi, May 2002

Review of Stata II AERC Training Workshop Nairobi, May 2002 Review of Stata II AERC Training Workshop Nairobi, 20-24 May 2002 This note provides more information on the basics of Stata that should help you with the exercises in the remaining sessions of the workshop.

More information

25 Working with categorical data and factor variables

25 Working with categorical data and factor variables 25 Working with categorical data and factor variables Contents 25.1 Continuous, categorical, and indicator variables 25.1.1 Converting continuous variables to indicator variables 25.1.2 Converting continuous

More information

Introduction to Stata

Introduction to Stata Introduction to Stata Introduction In introductory biostatistics courses, you will use the Stata software to apply statistical concepts and practice analyses. Most of the commands you will need are available

More information

ECON Introductory Econometrics Seminar 4

ECON Introductory Econometrics Seminar 4 ECON4150 - Introductory Econometrics Seminar 4 Stock and Watson EE8.2 April 28, 2015 Stock and Watson EE8.2 ECON4150 - Introductory Econometrics Seminar 4 April 28, 2015 1 / 20 Current Population Survey

More information

Empirical Asset Pricing

Empirical Asset Pricing Department of Mathematics and Statistics, University of Vaasa, Finland Texas A&M University, May June, 2013 As of May 17, 2013 Part I Stata Introduction 1 Stata Introduction Interface Commands Command

More information

A Short Introduction to STATA

A Short Introduction to STATA A Short Introduction to STATA 1) Introduction: This session serves to link everyone from theoretical equations to tangible results under the amazing promise of Stata! Stata is a statistical package that

More information

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata..

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata.. Introduction to Stata 2016-17 01. First Session I- Launching and Exiting Stata... 1. Launching Stata... 2. Exiting Stata.. II - Toolbar, Menu bar and Windows.. 1. Toolbar Key.. 2. Menu bar Key..... 3.

More information

Bivariate (Simple) Regression Analysis

Bivariate (Simple) Regression Analysis Revised July 2018 Bivariate (Simple) Regression Analysis This set of notes shows how to use Stata to estimate a simple (two-variable) regression equation. It assumes that you have set Stata up on your

More information

Exercise 1: Introduction to Stata

Exercise 1: Introduction to Stata Exercise 1: Introduction to Stata New Stata Commands use describe summarize stem graph box histogram log on, off exit New Stata Commands Downloading Data from the Web I recommend that you use Internet

More information

An Introduction to STATA ECON 330 Econometrics Prof. Lemke

An Introduction to STATA ECON 330 Econometrics Prof. Lemke An Introduction to STATA ECON 330 Econometrics Prof. Lemke 1. GETTING STARTED A requirement of this class is that you become very comfortable with STATA, a leading statistical software package. You were

More information

A QUICK INTRODUCTION TO STATA

A QUICK INTRODUCTION TO STATA A QUICK INTRODUCTION TO STATA This module provides a quick introduction to STATA. After completing this module you will be able to input data, save data, transform data, create basic tables, create basic

More information

Week 10: Heteroskedasticity II

Week 10: Heteroskedasticity II Week 10: Heteroskedasticity II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Dealing with heteroskedasticy

More information

PubHlth 640 Intermediate Biostatistics Unit 2 - Regression and Correlation. Simple Linear Regression Software: Stata v 10.1

PubHlth 640 Intermediate Biostatistics Unit 2 - Regression and Correlation. Simple Linear Regression Software: Stata v 10.1 PubHlth 640 Intermediate Biostatistics Unit 2 - Regression and Correlation Simple Linear Regression Software: Stata v 10.1 Emergency Calls to the New York Auto Club Source: Chatterjee, S; Handcock MS and

More information

Week 4: Simple Linear Regression III

Week 4: Simple Linear Regression III Week 4: Simple Linear Regression III Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Goodness of

More information

An Introduction to Stata Part I: Data Management

An Introduction to Stata Part I: Data Management An Introduction to Stata Part I: Data Management Kerry L. Papps 1. Overview These two classes aim to give you the necessary skills to get started using Stata for empirical research. The first class will

More information

schooling.log 7/5/2006

schooling.log 7/5/2006 ----------------------------------- log: C:\dnb\schooling.log log type: text opened on: 5 Jul 2006, 09:03:57. /* schooling.log */ > use schooling;. gen age2=age76^2;. /* OLS (inconsistent) */ > reg lwage76

More information

AcaStat User Manual. Version 8.3 for Mac and Windows. Copyright 2014, AcaStat Software. All rights Reserved.

AcaStat User Manual. Version 8.3 for Mac and Windows. Copyright 2014, AcaStat Software. All rights Reserved. AcaStat User Manual Version 8.3 for Mac and Windows Copyright 2014, AcaStat Software. All rights Reserved. http://www.acastat.com Table of Contents INTRODUCTION... 5 GETTING HELP... 5 INSTALLATION... 5

More information

Appendix II: STATA Preliminary

Appendix II: STATA Preliminary Appendix II: STATA Preliminary STATA is a statistical software package that offers a large number of statistical and econometric estimation procedures. With STATA we can easily manage data and apply standard

More information

Chapter 1. Looking at Data-Distribution

Chapter 1. Looking at Data-Distribution Chapter 1. Looking at Data-Distribution Statistics is the scientific discipline that provides methods to draw right conclusions: 1)Collecting the data 2)Describing the data 3)Drawing the conclusions Raw

More information

GETTING DATA INTO THE PROGRAM

GETTING DATA INTO THE PROGRAM GETTING DATA INTO THE PROGRAM 1. Have a Stata dta dataset. Go to File then Open. OR Type use pathname in the command line. 2. Using a SAS or SPSS dataset. Use Stat Transfer. (Note: do not become dependent

More information

texdoc 2.0 An update on creating LaTeX documents from within Stata Example 2

texdoc 2.0 An update on creating LaTeX documents from within Stata Example 2 texdoc 20 An update on creating LaTeX documents from within Stata Contents Example 2 Ben Jann University of Bern, benjann@sozunibech 2016 German Stata Users Group Meeting GESIS, Cologne, June 10, 2016

More information

Panel Data 4: Fixed Effects vs Random Effects Models

Panel Data 4: Fixed Effects vs Random Effects Models Panel Data 4: Fixed Effects vs Random Effects Models Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised April 4, 2017 These notes borrow very heavily, sometimes verbatim,

More information

Week 11: Interpretation plus

Week 11: Interpretation plus Week 11: Interpretation plus Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline A bit of a patchwork

More information

Preparing Data for Analysis in Stata

Preparing Data for Analysis in Stata Preparing Data for Analysis in Stata Before you can analyse your data, you need to get your data into an appropriate format, to enable Stata to work for you. To avoid rubbish results, you need to check

More information

Appendix II: STATA Preliminary

Appendix II: STATA Preliminary Appendix II: STATA Preliminary STATA is a statistical software package that offers a large number of statistical and econometric estimation procedures. With STATA we can easily manage data and apply standard

More information

Creating LaTeX and HTML documents from within Stata using texdoc and webdoc. Example 2

Creating LaTeX and HTML documents from within Stata using texdoc and webdoc. Example 2 Creating LaTeX and HTML documents from within Stata using texdoc and webdoc Contents Example 2 Ben Jann University of Bern, benjann@sozunibech Nordic and Baltic Stata Users Group meeting Oslo, September

More information

STATA Hand Out 1. STATA's latest version is version 12. Most commands in this hand-out work on all versions of STATA.

STATA Hand Out 1. STATA's latest version is version 12. Most commands in this hand-out work on all versions of STATA. STATA Hand Out 1 STATA Background: STATA is a Data Analysis and Statistical Software developed by the company STATA-CORP in 1985. It is widely used by researchers across different fields. STATA is popular

More information

Chapter 2 Organizing and Graphing Data. 2.1 Organizing and Graphing Qualitative Data

Chapter 2 Organizing and Graphing Data. 2.1 Organizing and Graphing Qualitative Data Chapter 2 Organizing and Graphing Data 2.1 Organizing and Graphing Qualitative Data 2.2 Organizing and Graphing Quantitative Data 2.3 Stem-and-leaf Displays 2.4 Dotplots 2.1 Organizing and Graphing Qualitative

More information

THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE

THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE PLS 802 Spring 2018 Professor Jacoby THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE This handout shows the log of a Stata session

More information

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval

Epidemiology Principles of Biostatistics Chapter 3. Introduction to SAS. John Koval Epidemiology 9509 Principles of Biostatistics Chapter 3 John Koval Department of Epidemiology and Biostatistics University of Western Ontario What we will do today We will learn to use use SAS to 1. read

More information

Stata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012

Stata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012 Stata Session 2 Tarjei Havnes 1 ESOP and Department of Economics University of Oslo 2 Research department Statistics Norway ECON 4136, UiO, 2012 Tarjei Havnes (University of Oslo) Stata Session 2 ECON

More information

range: [1,20] units: 1 unique values: 20 missing.: 0/20 percentiles: 10% 25% 50% 75% 90%

range: [1,20] units: 1 unique values: 20 missing.: 0/20 percentiles: 10% 25% 50% 75% 90% ------------------ log: \Term 2\Lecture_2s\regression1a.log log type: text opened on: 22 Feb 2008, 03:29:09. cmdlog using " \Term 2\Lecture_2s\regression1a.do" (cmdlog \Term 2\Lecture_2s\regression1a.do

More information

Cluster Randomization Create Cluster Means Dataset

Cluster Randomization Create Cluster Means Dataset Chapter 270 Cluster Randomization Create Cluster Means Dataset Introduction A cluster randomization trial occurs when whole groups or clusters of individuals are treated together. Examples of such clusters

More information

For many people, learning any new computer software can be an anxietyproducing

For many people, learning any new computer software can be an anxietyproducing 1 Getting to Know Stata 12 For many people, learning any new computer software can be an anxietyproducing task. When that computer program involves statistics, the stress level generally increases exponentially.

More information

Basic Stata Tutorial

Basic Stata Tutorial Basic Stata Tutorial By Brandon Heck Downloading Stata To obtain Stata, select your country of residence and click Go. Then, assuming you are a student, click New Educational then click Students. The capacity

More information

Basics of Stata, Statistics 220 Last modified December 10, 1999.

Basics of Stata, Statistics 220 Last modified December 10, 1999. Basics of Stata, Statistics 220 Last modified December 10, 1999. 1 Accessing Stata 1.1 At USITE Using Stata on the USITE PCs: Stata is easily available from the Windows PCs at Harper and Crerar USITE.

More information

Lecture 3: The basic of programming- do file and macro

Lecture 3: The basic of programming- do file and macro Introduction to Stata- A. Chevalier Lecture 3: The basic of programming- do file and macro Content of Lecture 3: -Entering and executing programs do file program ado file -macros 1 A] Entering and executing

More information

April 4, SAS General Introduction

April 4, SAS General Introduction PP 105 Spring 01-02 April 4, 2002 SAS General Introduction TA: Kanda Naknoi kanda@stanford.edu Stanford University provides UNIX computing resources for its academic community on the Leland Systems, which

More information

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany STATA Tutorial to Accompany Introduction to Econometrics by James H. Stock and Mark W. Watson STATA Tutorial to accompany Stock/Watson Introduction to Econometrics Copyright 2003 Pearson Education Inc.

More information

RUDIMENTS OF STATA. After entering this command the data file WAGE1.DTA is loaded into memory.

RUDIMENTS OF STATA. After entering this command the data file WAGE1.DTA is loaded into memory. J.M. Wooldridge Michigan State University RUDIMENTS OF STATA This handout covers the most often encountered Stata commands. It is not comprehensive, but the summary will allow you to do basic data management

More information

Principles of Biostatistics and Data Analysis PHP 2510 Lab2

Principles of Biostatistics and Data Analysis PHP 2510 Lab2 Goals for Lab2: Familiarization with Do-file Editor (two important features: reproducible and analysis) Reviewing commands for summary statistics Visual depiction of data- bar chart and histograms Stata

More information

Centering and Interactions: The Training Data

Centering and Interactions: The Training Data Centering and Interactions: The Training Data A random sample of 150 technical support workers were first given a test of their technical skill and knowledge, and then randomly assigned to one of three

More information

CLAREMONT MCKENNA COLLEGE. Fletcher Jones Student Peer to Peer Technology Training Program. Basic Statistics using Stata

CLAREMONT MCKENNA COLLEGE. Fletcher Jones Student Peer to Peer Technology Training Program. Basic Statistics using Stata CLAREMONT MCKENNA COLLEGE Fletcher Jones Student Peer to Peer Technology Training Program Basic Statistics using Stata An Introduction to Stata A Comparison of Statistical Packages... 3 Opening Stata...

More information

Economics 145 Fall 2009 Howell Getting Started with Stata

Economics 145 Fall 2009 Howell Getting Started with Stata Getting Started with Stata This simple introduction to Stata will allow you to open a dataset and conduct some basic analyses similar to those that we have discussed in Excel. For those who would like

More information

CAPACITY BUILDING WORKSHOP- DATA MANAGEMENT SOFTWARE

CAPACITY BUILDING WORKSHOP- DATA MANAGEMENT SOFTWARE March 2011 CAPACITY BUILDING WORKSHOP- DATA MANAGEMENT SOFTWARE Training on data software PSPP Introduction Dakar, March 2011 ACP Observatory on Migration 20, rue Belliardstraat (7th floor) 1040 Brussels

More information

ASSIGNMENT 6 Final_Tracts.shp Phil_Housing.mat lnmv %Vac %NW Final_Tracts.shp Philadelphia Housing Phil_Housing_ Using Matlab Eire

ASSIGNMENT 6 Final_Tracts.shp Phil_Housing.mat lnmv %Vac %NW Final_Tracts.shp Philadelphia Housing Phil_Housing_ Using Matlab Eire ESE 502 Tony E. Smith ASSIGNMENT 6 This final study is a continuation of the analysis in Assignment 5, and will use the results of that analysis. It is assumed that you have constructed the shapefile,

More information

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions)

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions) THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533 MIDTERM EXAMINATION: October 14, 2005 Instructor: Val LeMay Time: 50 minutes 40 Marks FRST 430 50 Marks FRST 533 (extra questions) This examination

More information

Data Analysis and Solver Plugins for KSpread USER S MANUAL. Tomasz Maliszewski

Data Analysis and Solver Plugins for KSpread USER S MANUAL. Tomasz Maliszewski Data Analysis and Solver Plugins for KSpread USER S MANUAL Tomasz Maliszewski tmaliszewski@wp.pl Table of Content CHAPTER 1: INTRODUCTION... 3 1.1. ABOUT DATA ANALYSIS PLUGIN... 3 1.3. ABOUT SOLVER PLUGIN...

More information

STATA 13 INTRODUCTION

STATA 13 INTRODUCTION STATA 13 INTRODUCTION Catherine McGowan & Elaine Williamson LONDON SCHOOL OF HYGIENE & TROPICAL MEDICINE DECEMBER 2013 0 CONTENTS INTRODUCTION... 1 Versions of STATA... 1 OPENING STATA... 1 THE STATA

More information

Data Management 2. 1 Introduction. 2 Do-files. 2.1 Ado-files and Do-files

Data Management 2. 1 Introduction. 2 Do-files. 2.1 Ado-files and Do-files University of California, Santa Cruz Department of Economics ECON 294A (Fall 2014)- Stata Lab Instructor: Manuel Barron 1 Data Management 2 1 Introduction Today we are going to introduce the use of do-files,

More information

Lecture Notes 3: Data summarization

Lecture Notes 3: Data summarization Lecture Notes 3: Data summarization Highlights: Average Median Quartiles 5-number summary (and relation to boxplots) Outliers Range & IQR Variance and standard deviation Determining shape using mean &

More information

ECONOMICS 452* -- Stata 12 Tutorial 1. Stata 12 Tutorial 1. TOPIC: Getting Started with Stata: An Introduction or Review

ECONOMICS 452* -- Stata 12 Tutorial 1. Stata 12 Tutorial 1. TOPIC: Getting Started with Stata: An Introduction or Review Stata 12 Tutorial 1 TOPIC: Getting Started with Stata: An Introduction or Review DATA: auto1.raw and auto1.txt (two text-format data files) TASKS: Stata 12 Tutorial 1 is intended to introduce you to some

More information

Introduction to Programming in Stata

Introduction to Programming in Stata Introduction to in Stata Laron K. University of Missouri Goals Goals Replicability! Goals Replicability! Simplicity/efficiency Goals Replicability! Simplicity/efficiency Take a peek under the hood! Data

More information

Lab #1: Introduction to Basic SAS Operations

Lab #1: Introduction to Basic SAS Operations Lab #1: Introduction to Basic SAS Operations Getting Started: OVERVIEW OF SAS (access lab pages at http://www.stat.lsu.edu/exstlab/) There are several ways to open the SAS program. You may have a SAS icon

More information

Factorial ANOVA. Skipping... Page 1 of 18

Factorial ANOVA. Skipping... Page 1 of 18 Factorial ANOVA The potato data: Batches of potatoes randomly assigned to to be stored at either cool or warm temperature, infected with one of three bacterial types. Then wait a set period. The dependent

More information

STAT 7000: Experimental Statistics I

STAT 7000: Experimental Statistics I STAT 7000: Experimental Statistics I 2. A Short SAS Tutorial Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2009 Peng Zeng (Auburn University) STAT 7000 Lecture Notes Fall 2009

More information

International Graduate School of Genetic and Molecular Epidemiology (GAME) Computing Notes and Introduction to Stata

International Graduate School of Genetic and Molecular Epidemiology (GAME) Computing Notes and Introduction to Stata International Graduate School of Genetic and Molecular Epidemiology (GAME) Computing Notes and Introduction to Stata Paul Dickman September 2003 1 A brief introduction to Stata Starting the Stata program

More information

A Short Guide to Stata 10 for Windows

A Short Guide to Stata 10 for Windows A Short Guide to Stata 10 for Windows 1. Introduction 2 2. The Stata Environment 2 3. Where to get help 2 4. Opening and Saving Data 3 5. Importing Data 4 6. Data Manipulation 5 7. Descriptive Statistics

More information

ECONOMICS 452 TIME SERIES WITH STATA

ECONOMICS 452 TIME SERIES WITH STATA 1 ECONOMICS 452 01 Introduction TIME SERIES WITH STATA This manual is intended for the first half of the Economics 452 course and introduces some of the time series capabilities in Stata 8 I will be writing

More information

STAT 3304/5304 Introduction to Statistical Computing. Introduction to SAS

STAT 3304/5304 Introduction to Statistical Computing. Introduction to SAS STAT 3304/5304 Introduction to Statistical Computing Introduction to SAS What is SAS? SAS (originally an acronym for Statistical Analysis System, now it is not an acronym for anything) is a program designed

More information

Getting Our Feet Wet with Stata SESSION TWO Fall, 2018

Getting Our Feet Wet with Stata SESSION TWO Fall, 2018 Getting Our Feet Wet with Stata SESSION TWO Fall, 2018 Instructor: Cathy Zimmer 962-0516, cathy_zimmer@unc.edu 1) REMINDER BRING FLASH DRIVES! 2) QUESTIONS ON EXERCISES? 3) WHAT IS Stata SYNTAX? a) A set

More information

Averages and Variation

Averages and Variation Averages and Variation 3 Copyright Cengage Learning. All rights reserved. 3.1-1 Section 3.1 Measures of Central Tendency: Mode, Median, and Mean Copyright Cengage Learning. All rights reserved. 3.1-2 Focus

More information

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables Jennie Murack You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables How to conduct basic descriptive statistics

More information

Health Disparities (HD): It s just about comparing two groups

Health Disparities (HD): It s just about comparing two groups A review of modern methods of estimating the size of health disparities May 24, 2017 Emil Coman 1 Helen Wu 2 1 UConn Health Disparities Institute, 2 UConn Health Modern Modeling conference, May 22-24,

More information

Week 5: Multiple Linear Regression II

Week 5: Multiple Linear Regression II Week 5: Multiple Linear Regression II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Adjusted R

More information

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2 SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Department of MathemaGcs and StaGsGcs Phone: 4-3620 Office: Parker 364- A E- mail: carpedm@auburn.edu Web: hup://www.auburn.edu/~carpedm/stat6110

More information

optimization_machine_probit_bush106.c

optimization_machine_probit_bush106.c optimization_machine_probit_bush106.c. probit ybush black00 south hispanic00 income owner00 dwnom1n dwnom2n Iteration 0: log likelihood = -299.27289 Iteration 1: log likelihood = -154.89847 Iteration 2:

More information

Notes for Student Version of Soritec

Notes for Student Version of Soritec Notes for Student Version of Soritec Department of Economics January 20, 2001 INSTRUCTIONS FOR USING SORITEC This is a brief introduction to the use of the student version of the Soritec statistical/econometric

More information

Brief Guide on Using SPSS 10.0

Brief Guide on Using SPSS 10.0 Brief Guide on Using SPSS 10.0 (Use student data, 22 cases, studentp.dat in Dr. Chang s Data Directory Page) (Page address: http://www.cis.ysu.edu/~chang/stat/) I. Processing File and Data To open a new

More information

SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian. Panel Data Analysis: Fixed Effects Models

SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian. Panel Data Analysis: Fixed Effects Models SOCY776: Longitudinal Data Analysis Instructor: Natasha Sarkisian Panel Data Analysis: Fixed Effects Models Fixed effects models are similar to the first difference model we considered for two wave data

More information

Lab 1: Basics of Stata Short Course on Poverty & Development for Nordic Ph.D. Students University of Copenhagen June 13-23, 2000

Lab 1: Basics of Stata Short Course on Poverty & Development for Nordic Ph.D. Students University of Copenhagen June 13-23, 2000 Lab 1: Basics of Stata Short Course on Poverty & Development for Nordic Ph.D. Students University of Copenhagen June 13-23, 2000 This lab is designed to give you a basic understanding of the tools available

More information

SAS Training Spring 2006

SAS Training Spring 2006 SAS Training Spring 2006 Coxe/Maner/Aiken Introduction to SAS: This is what SAS looks like when you first open it: There is a Log window on top; this will let you know what SAS is doing and if SAS encountered

More information

Week 9: Modeling II. Marcelo Coca Perraillon. Health Services Research Methods I HSMP University of Colorado Anschutz Medical Campus

Week 9: Modeling II. Marcelo Coca Perraillon. Health Services Research Methods I HSMP University of Colorado Anschutz Medical Campus Week 9: Modeling II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Taking the log Retransformation

More information

PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2

PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2 PHPM 672/677 Lab #2: Variables & Conditionals Due date: Submit by 11:59pm Monday 2/5 with Assignment 2 Overview Most assignments will have a companion lab to help you learn the task and should cover similar

More information

Table of Contents (As covered from textbook)

Table of Contents (As covered from textbook) Table of Contents (As covered from textbook) Ch 1 Data and Decisions Ch 2 Displaying and Describing Categorical Data Ch 3 Displaying and Describing Quantitative Data Ch 4 Correlation and Linear Regression

More information

1. Descriptive Statistics

1. Descriptive Statistics 1.1 Descriptive statistics 1. Descriptive Statistics A Data management Before starting any statistics analysis with a graphics calculator, you need to enter the data. We will illustrate the process by

More information

A Quick Guide to Stata 8 for Windows

A Quick Guide to Stata 8 for Windows Université de Lausanne, HEC Applied Econometrics II Kurt Schmidheiny October 22, 2003 A Quick Guide to Stata 8 for Windows 2 1 Introduction A Quick Guide to Stata 8 for Windows This guide introduces the

More information

B.2 Measures of Central Tendency and Dispersion

B.2 Measures of Central Tendency and Dispersion Appendix B. Measures of Central Tendency and Dispersion B B. Measures of Central Tendency and Dispersion What you should learn Find and interpret the mean, median, and mode of a set of data. Determine

More information

A quick introduction to STATA

A quick introduction to STATA A quick introduction to STATA Data files and other resources for the course book Introduction to Econometrics by Stock and Watson is available on: http://wps.aw.com/aw_stock_ie_3/178/45691/11696965.cw/index.html

More information

Lab 2: OLS regression

Lab 2: OLS regression Lab 2: OLS regression Andreas Beger February 2, 2009 1 Overview This lab covers basic OLS regression in Stata, including: multivariate OLS regression reporting coefficients with different confidence intervals

More information

Introduction to Stata. Written by Yi-Chi Chen

Introduction to Stata. Written by Yi-Chi Chen Introduction to Stata Written by Yi-Chi Chen Center for Social Science Computation & Research 145 Savery Hall University of Washington Seattle, WA 98195 U.S.A (206)543-8110 September 2002 http://julius.csscr.washington.edu/pdf/stata.pdf

More information

Getting Started Using Stata

Getting Started Using Stata Quant II 2011: Categorical Data Analysis Getting Started Using Stata Shawna Rohrman 2010 05 09 Revised by Trisha Tiamzon 2010 12 26 Note: Parts of this guide were adapted from Stata s Getting Started with

More information