A First Tutorial in Stata

Size: px
Start display at page:

Download "A First Tutorial in Stata"

Transcription

1 A First Tutorial in Stata Stan Hurn Queensland University of Technology National Centre for Econometric Research Stan Hurn (NCER) Stata Tutorial 1 / 66

2 Table of contents 1 Preliminaries 2 Loading Data 3 Basic Descriptive Statistics 4 Basic Plotting 5 Simple Data Manipulation 6 Simple Linear Regression 7 Using do files 8 Some Regression Examples Electricity Data California Schools Data Food Expenditure and Income 9 Instrumental Variables Estimation Wage Data Artificial Data Stan Hurn (NCER) Stata Tutorial 2 / 66

3 Preliminaries Stata Stata is a fast, powerful statistical package with smart data-management facilities, a wide array of up-to-date statistical techniques, and an excellent system for producing publication-quality graphs The bad news is that Stata is NOT as easy to use as some other statistical packages, but Version 12 has got a reasonable menu-driven interface. On the whole the advantages probably outweigh the steepness of the initial learning curve. Stan Hurn (NCER) Stata Tutorial 3 / 66

4 Stata Resources Preliminaries One of the major advantages to using Stata is that there are a large number of helpful resources to be found. For example: a good web-based tutorial can be found at a useful introductory book is An Introduction to Modern Econometrics Using Stata by Christopher F. Baum published by Stata Press in 2006 Stan Hurn (NCER) Stata Tutorial 4 / 66

5 Preliminaries The Stata 12 Front End for Mac Stan Hurn (NCER) Stata Tutorial 5 / 66

6 Preliminaries The Stata 12 Front End for Windows Stan Hurn (NCER) Stata Tutorial 6 / 66

7 Preliminaries Stata 12 Front End Stata has an menu bar on the top and 5 internal windows. The main window is the one in the middle (1 on the previous slide). It gives you the all output of you operations in Stata. The Command window (2) executes commands. You can type commands directly in this window as an alternative to using the menu system. The Review window (3), lists all the operations preformed since opening Stata. If you click on one of your past commands, you will see the command being displayed in the Command window and you can re-run it by hitting the enter key. The Variables window (4) lists the variables in the current dataset (and their descriptions). When you double-click on the variable, it appears in the Command window. The Properties window (5) gives information about your dataset and your variables. Stan Hurn (NCER) Stata Tutorial 7 / 66

8 Preliminaries Changing the Working Directory To avoid having to specify the path each time you wish to load a data file or run a Stata program (saved in a do file), it is useful to changed the working directory so that Stata looks in the directory that you are currently working in. Click File Change Working Directory Browse for the correct directory and select it. The result is printed out in the Results window and the appropriate Stata command is echoed in Review window enabling you to reconstruct a do file of you session. Stan Hurn (NCER) Stata Tutorial 8 / 66

9 Loading Data Loading an Existing Stata File Simply click File Open and browse for an existing Stata data file. Stata data files have extensions dta. Open the file food.dta. You will note that two variables food exp and income appear in the Variables window of the Stata main page. In the Properties window you will see the filename food.dta together with some information about the file. This file has 2 variables, each with 40 observations and the size of the file in memory is also given. Stan Hurn (NCER) Stata Tutorial 9 / 66

10 Loading an Excel File Loading Data Stan Hurn (NCER) Stata Tutorial 10 / 66

11 Loading Data Loading an Excel File Load the Excel file US Macroeconomic Data.xls Click File Import Excel Spreadsheet Browse for the correct file in the working directory and open it. Remember to check the radio button asking if you want to use the first row as variable names. Changes variable names in Stata is something of a mystery when using the Menu. But using the command window is easy enough. rename oldname newname will do the trick. Try it. NOTE Case matters: if you use an uppercase letter where a lowercase letter belongs, or vice versa, an error message will display. Stan Hurn (NCER) Stata Tutorial 11 / 66

12 Loading Data Loading a CSV File Load the CSV file taylor.csv which contains data on the output gap, the inflation gap and the Federal Funds rate for the period 1961:Q1 to 1999:Q4. Click File Import Text data created by a spreadsheet Browse for the file and load it. You should have data on the variables ffr, infl and ygap. To specify this as time series data we need a series of dates. The date vector (called year ) is created using the following commands generate year = tq(1961q1) + _n-1 To make sure Data understands that this is a time series data set we need to tell it to use year as the date vector. The command is tsset year, quarterly The Stata menu command is to do this is found on the next slide. Stan Hurn (NCER) Stata Tutorial 12 / 66

13 Assigning a Date Vector Loading Data Stan Hurn (NCER) Stata Tutorial 13 / 66

14 Basic Descriptive Statistics Summary Statistics Reload the file food.dta. Now click Statistics and then choose Summaries, tables, and tests Summary and descriptive statistics. Sometimes it is useful to have a look at the histogram of the data. Click Graphics Histogram and experiment with some of the options. Another useful visual tool is the box plot. Click Graphics Box plot Stan Hurn (NCER) Stata Tutorial 14 / 66

15 Basic Plotting Simple Scatter Click File Open and browse for food.dta. This is a Stata data file. Click Grahics Twoway and create a simple scatter plot of weekly food expenditure versus weekly income. Stan Hurn (NCER) Stata Tutorial 15 / 66

16 Basic Plotting Time Series Plots Let s work through a simple example to construct a plot of the Australian business cycle. Click File Import Excel Spreadsheet and use the first row as variable names. This will give you a variable gdp. Make a time series data set by creating a quarterly date vector from 1959:Q2 to 1996:Q1 and make a time-series data set using dates as the time vector. The commands are generate dates = tq(1959q2) + _n-1 tsset dates, quarterly Plot the data. Stan Hurn (NCER) Stata Tutorial 16 / 66

17 Australian GDP Basic Plotting Stan Hurn (NCER) Stata Tutorial 17 / 66

18 Simple Data Manipulation Data Transformations Stata s basic commands for data transformation are generate and replace. generate creates a new variable. replace modifies an existing variable. Both commands are accessed via the Data menu item on the main Stata toolbar. Stan Hurn (NCER) Stata Tutorial 18 / 66

19 generate and replace Simple Data Manipulation Stan Hurn (NCER) Stata Tutorial 19 / 66

20 Simple Data Manipulation Growth rate of Australian GDP Create a growth rate of gdp using the L. operator (lag operator) generate g = log(gdp)-log(l1.gdp) Stan Hurn (NCER) Stata Tutorial 20 / 66

21 Simple Data Manipulation Australian Business Cycle While the plot of the growth rate of gdp is more informative than a plot of the level of the series, yet more information can be obtained by smoothing g. generate bcycle = (L3.g+L2.g+L1.g+g+F1.g+F2.g+F3.g )/7 Stan Hurn (NCER) Stata Tutorial 21 / 66

22 Simple Data Manipulation Load the food data set 1 Make sure you are in the right working directory (File Change Working Directory) 2 Load the dataset in food.dta and look at the data characteristics. 3 You can experiment using Statistics Summaries, tables, and tests Summary and descriptive statistics but it is simpler to issue the following commands from the command window. describe list browse summarize summarize food exp, detail Stan Hurn (NCER) Stata Tutorial 22 / 66

23 Simple Data Manipulation Simple scatter plots 1 Use Grahics Twoway to create a simple scatter plot of weekly food expenditure versus weekly income. 2 Issue the command twoway (scatter food exp income) 3 Issue the command twoway (scatter food exp income), title(food Expenditure Data) 4 Issue the command twoway (scatter food exp income) (lfit food exp income), title(fitted Regression Line) The line of best fit is obtained by linear regression of food expenditure on income. We will now explore this in more detail. Stan Hurn (NCER) Stata Tutorial 23 / 66

24 Simple Linear Regression A First Regression 1 Load the data set caschool.dta. 2 Run a regression of the test scores, testscr, against the student-teacher ratio, str. You do this by selecting Statistics Linear models and related Linear regression. 3 A dialogue box will pop up which will require you to fill in the dependent and independent variable. Stan Hurn (NCER) Stata Tutorial 24 / 66

25 Regression dialogue box Simple Linear Regression Stan Hurn (NCER) Stata Tutorial 25 / 66

26 Regression Results Simple Linear Regression Stata reports the regression results as follows: The regression predicts that if class size falls by one student, the test scores will increase by 2.28 points. Stan Hurn (NCER) Stata Tutorial 26 / 66

27 Simple Linear Regression Predicted Values and Residuals A common task after running a regression is storing the fitted values, ŷ, or the residuals, û. Here you must become familiar with the very useful Statistics Postestimation menu. One option to select is Predictions, residuals, etc which gives the dialogue box Stan Hurn (NCER) Stata Tutorial 27 / 66

28 Simple Linear Regression Predicted Values and Residuals 1 Note that the names you choose for the predicted values and/or residuals cannot already be taken. Use something obvious like yfit or yhat for the fitted values and res or uhat for the residuals. 2 You can also use the Postestimation option to obtain confidence intervals for the prediction using the option Standard errors of the prediction. Save this as yhatci. The commands. gen yhatu = yhat+1.96*yhatci. gen yhatl = yhat *yhatci will now generate a 95% confidence interval for the prediction. 3 To be more precise you could use the t-distribution rather than hard-code The commands are. gen ttail = invttail(e(df_r),0.975). gen yhatu = yhat+ttail*yhatci Note that e(df_r) is the way Stata stores the degrees of freedom for the residuals and invtttail computes the relevant critical value from the t-distribution. Stan Hurn (NCER) Stata Tutorial 28 / 66

29 Simple Linear Regression Predictions with 95% Confidence Interval Stan Hurn (NCER) Stata Tutorial 29 / 66

30 Simple Linear Regression Out-of-sample Prediction Obtaining out-of-sample predictions is a bit clunky and using the command line is probably the way to go. Suppose there are 40 observations in the data sample and you want to obtain an out-of-sample prediction for a value of the explanatory variable income = 20. The code is // add observation to data file edit set obs 41 replace income=20 in 41 // obtain prediction predict yhat0 list income yhat0 in 41 Stan Hurn (NCER) Stata Tutorial 30 / 66

31 Simple Linear Regression You should explore other visualisation options Stan Hurn (NCER) Stata Tutorial 31 / 66

32 Using do files Using do files A nice thing about Stata is that there is a simple way to save all your work steps so you or others can easily reproduce your analysis. The way to do so is using a so-called do file. Remember that all Stata does is to execute commands, which you either clicked on using the menu or directly typed in the Command window. A command is just one line of text (or code). If you want to save this command for later use, just copy it (simply click on it in the Review window and copy the line of text that comes up in the Command window) and paste it into the do file. The next slides describe how you can open and use a do file. Stan Hurn (NCER) Stata Tutorial 32 / 66

33 Using do files Where to open a new do file You can open a new do file by clicking on the New Do file Editor button below the menu (or press Ctrl+9): Stan Hurn (NCER) Stata Tutorial 33 / 66

34 Using a do file Using do files A do file is just a list of commands. Each command has to start with a new line. Normally you will start your do file telling it which data to load in the first line. In the following lines you can then include analysis commands. If you leave a row empty no problem. If you want to write comments or text, which are not Stata code, you have to start the row with // or a * symbol; using these symbols tell Stata that this line is not to be executed. Stan Hurn (NCER) Stata Tutorial 34 / 66

35 Using do files Executing commands with a do file If you want to re-run a command from the do file, just highlight the line and press the Execute (do) button (or press Ctrl+d). If you don t mark any specific line, Stata will run all the commands in the do file you have currently opened from first to last. The results of the command(s) are displayed in the main view as if you were using the menu. Stan Hurn (NCER) Stata Tutorial 35 / 66

36 Some Regression Examples Electricity Data Demand for Residential Electricity The Excel file elecex.xls has quarterly data on the following variables from 1972:02 to 1993:04. RESKWH = electricity sales to residential customers (million kilowatt-hours) NOCUST = number of customers (thousands) PRICE = electricity tariff (cents/kwh) CPI = consumer price index INCOME = nominal personal income (millions of dollars) CDD = cooling degree days HDD = heating degree days POP = population (thousands) Import the data into Stata using the Import wizard. Take care to check the Radio Button asking whether or not to treat the first row as variable names! Once done you can save this as elecex.dta for your own convenience. Stan Hurn (NCER) Stata Tutorial 36 / 66

37 Some Regression Examples Electricity Data Time Series Data Most multiple regression exercises involve data manipulation. This is where writing do files is a powerful way of ensuring that you can recover your previous work and others can reproduce it. 1 This is time series data, so we need to create a date vector set dates as the date vector. generate dates = tq(1972q2) + _n-1 tsset dates, quarterly Stan Hurn (NCER) Stata Tutorial 37 / 66

38 Some Regression Examples Electricity Data Data Manipulations 1 Generate the dependent variable: gen LKWH=log(RESKWH/NOCUST) 2 We want to explain this demand in terms of real per capita income so create the variable gen LY=log((100\ast INCOME)/(CPI\ast POP)) 3 Another important determinant is price we want to use the real average cost of electricity gen LPRICE=log(100 \ast PRICE/CPI) Stan Hurn (NCER) Stata Tutorial 38 / 66

39 Some Regression Examples Getting a Feel for the Data Electricity Data You should always try to understand your data before beginning to model it. A useful starting point is the Graphics Scatterplot matrix option. As the name suggests this creates a matrix of scatterplots of the variables against each other. Hopefully this reveals some pattern to the relationships between the dependent and explanatory variables and no discernible pattern between the explanatory variables themselves. Stan Hurn (NCER) Stata Tutorial 39 / 66

40 Matrix Plots Some Regression Examples Electricity Data Stan Hurn (NCER) Stata Tutorial 40 / 66

41 Regression Results Some Regression Examples Electricity Data The results from running the linear regression of the base model of demand on price, income and the weather variables are as follows: Stan Hurn (NCER) Stata Tutorial 41 / 66

42 ACF and PACF Some Regression Examples Electricity Data This is time series data, so one of the problems may be autocorrelation in the residuals. The autocorrelation function and partial autocorrelation function of the residuals look as follows Stan Hurn (NCER) Stata Tutorial 42 / 66

43 Some Regression Examples AR(1) Estimation Options Electricity Data The following dialogue box under the Time Series Prais-Winstein regression allows you to correct for autocorrelation in the residuals. Stan Hurn (NCER) Stata Tutorial 43 / 66

44 AR(1) output Some Regression Examples Electricity Data The results from running the linear regression of the AR(1) model of demand on price, income and the weather variables are as follows: Stan Hurn (NCER) Stata Tutorial 44 / 66

45 Some Regression Examples California Schools Data California Test Score Data 1 Load the file caschool.dta. 2 Run the regression relating test scores to the student teacher ratio testscr = β 0 + β 1 str + u 3 The concern is that this equation suffers omitted variable bias which we can correct using multiple regression. Try relating test scores to the student teacher ratio and the percentage of English learners testscr = β 0 + β 1 str + β 2 el pct + u Note that the size of the effect of str is halved! 4 Now try adding expenditure per student to the regression testscr = β 0 + β 1 str + β 2 el pct + β 3 expn stu + u Stan Hurn (NCER) Stata Tutorial 45 / 66

46 Presenting Results Some Regression Examples California Schools Data This exercise has shown that the coefficient on str in the simple two variable model is biased. But the question remains as to how to present this in a reasonable way so that we can see the pattern immediately. The answer is to store the results of the regressions and then to use Stata s Postestimation menu item to help organise the presentation of the results. Unfortunately this is going to involve estimating the regressions again and then using Statistics Postestimation Manage estimation results Store in memory After each estimation you will need to name your model. Lets be original and call them Model1, Model2 and Model3. As you do this, watch how Stata echoes your command and think how easy it would be to use a do file instead. Stan Hurn (NCER) Stata Tutorial 46 / 66

47 Some Regression Examples Table of Estimation Results 1 California Schools Data Show the results: estimates table Model1 Model2 Model3 Here both coefficients and standard errors of the various models are summarised in an accessible way and the reduction in the significance of str is clear. Stan Hurn (NCER) Stata Tutorial 47 / 66

48 Some Regression Examples Table of Estimation Results 2 California Schools Data Further detail on the results: estimates table Model1 Model2 Model3, star( ) This is a particularly useful way of summarising the results as the significant coefficients are marked. Note how str is insignificant in Model 3. Essentially the t-tests on the individual coefficients are interpreted for you!! Stan Hurn (NCER) Stata Tutorial 48 / 66

49 Joint Significance Test Some Regression Examples California Schools Data Now let s test the hypothesis that both str and exp stu are zero. The tests are to be found at: Statistics Postestimation Tests Test linear hypotheses Obviously you are going to have to give Stata some information on which coefficients you wish to test. Once you have selected Test linear hypotheses, click on Create and the following dialogue box with appear. Stan Hurn (NCER) Stata Tutorial 49 / 66

50 Some Regression Examples California Schools Data Testing Joint Hypotheses The result shows that the p-value of the F-test of the joint hypothesis that β 1 = β 3 = 0 is so we would reject the null hypothesis. At least one of str and exp stu is a significant factor in the regression. Stan Hurn (NCER) Stata Tutorial 50 / 66

51 Some Regression Examples California Schools Data Testing Joint Hypotheses for Windows The result shows that the p-value of the F-test of the joint hypothesis that β 1 = β 3 = 0 is so we would reject the null hypothesis. At least one of str and exp stu is a significant factor in the regression. Stan Hurn (NCER) Stata Tutorial 51 / 66

52 Food Data Set Some Regression Examples Food Expenditure and Income Study the relationship between food expenditures and income reg food exp income and plot residuals Stan Hurn (NCER) Stata Tutorial 52 / 66

53 Some Regression Examples Food Expenditure and Income Functional Form It may be that a linear relationship between food expenditures and income is not a good choice. Let us try to fit a linear - log model. food exp = β 0 + β 1 ln(income) + u Unfortunately Stata doesn t recognise ln(income) and you have to generate a new variable, say gen lincome = log(income) Stan Hurn (NCER) Stata Tutorial 53 / 66

54 Fitted Values Some Regression Examples Food Expenditure and Income Stan Hurn (NCER) Stata Tutorial 54 / 66

55 Elasticities Some Regression Examples Food Expenditure and Income Now you can calculate the percentage change in food expenditure given a 1 percent change in income using the marginal effects options on the Postestimation menu. Stan Hurn (NCER) Stata Tutorial 55 / 66

56 Wage Data Instrumental Variables Estimation Wage Data This example looks at wage data. The datafile is mroz.dta and the focus is on modelling the wage of married women only. The variables that are important are as follows: educ = years of schooling wage = estimated wage from earns., hours motheduc = mothers years of schooling fatheduc = fathers years of schooling exper = actual labor mkt exper lfp = 1 if in labor force, 1975 Stan Hurn (NCER) Stata Tutorial 56 / 66

57 Instrumental Variables Estimation Estimating a Wage Equation Wage Data Suppose we wish to estimate the equation that relates wages to education and experience: ln(wage) = β 0 + β 1 educ + β 2 exper + β 3 exper 2 + u t. The problem is that educ may be correlated with u because it is an imperfect proxy for ability and that using OLS may therefore result in biased coefficient estimates. Stan Hurn (NCER) Stata Tutorial 57 / 66

58 OLS Results Instrumental Variables Estimation Wage Data Stan Hurn (NCER) Stata Tutorial 58 / 66

59 Instrumental Variables Estimation Wage Data The IV Estimator We can now try estimate the regression by IV using mothereduc as an instrument for educ. A mother s education does not itself belong in the daughter s wage equation, but it is reasonable to propose that more educated mothers are more likely to have educated daughters. Click Statistics Edogenous Covariates Single-equation instrumental-variables estimator This sequence will open a Dialogue Box which will prompt for more information like 1 dependent variable, independent variables, endogenous variables and instrumental variables; 2 other options for the constant and standard error correction etc. Stan Hurn (NCER) Stata Tutorial 59 / 66

60 The IV Estimator Instrumental Variables Estimation Wage Data Stan Hurn (NCER) Stata Tutorial 60 / 66

61 IV Results Instrumental Variables Estimation Wage Data Stan Hurn (NCER) Stata Tutorial 61 / 66

62 Instrumental Variables Estimation Wage Data Some Observations 1 Although not shown here mothereduc is highly significant in the first-stage regression of the IV estimation indicating it is a strong instrument for educ. 2 The estimated return to education is about 10% lower than the OLS estimate. This is consistent with our earlier theoretical discussion that the OLS estimator tends to over-estimate the effect of a variable if that variable is positively correlated with the omitted factors present in the error term. 3 The standard error on the coefficient on educ is over 2.5 times larger than the standard error on the OLS estimate. This reflects the fact that even with a good instrument the IV estimator is not efficient. Of course this situation can be remedied slightly by adding more valid instruments for educ. Stan Hurn (NCER) Stata Tutorial 62 / 66

63 The Data Instrumental Variables Estimation Artificial Data The datafile is ivreg2.dta contains 500 artificially generated observations on x, y, z 1 and z 2. The variable y is generated as y t = β 0 + β 1 x t + e t, β 0 = 3, β 1 = 1 with Note that x N(0, 2), e N(0, 1), cov(x, e) = 0.9. ρ z1,x = 0.5 ρ z2,x = 0.3. Stan Hurn (NCER) Stata Tutorial 63 / 66

64 Instrumental Variables Estimation Summary of Estimation Results Artificial Data Table was generated by using the Postestimation menu option to store results and create a table. Stan Hurn (NCER) Stata Tutorial 64 / 66

65 Hausman Test Instrumental Variables Estimation Artificial Data To Implement the Hausman test assuming that you have stored the output from the IV and OLS regressions you click Postestimation Tests Hausman specification test Stan Hurn (NCER) Stata Tutorial 65 / 66

66 Hausman Test Instrumental Variables Estimation Artificial Data This indicates a strong rejection of the null hypothesis of exogeneity indicating that cov(x, u) 0 which we know to be true by construction. Stan Hurn (NCER) Stata Tutorial 66 / 66

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

GRETL FOR TODDLERS!! CONTENTS. 1. Access to the econometric software A new data set: An existent data set: 3

GRETL FOR TODDLERS!! CONTENTS. 1. Access to the econometric software A new data set: An existent data set: 3 GRETL FOR TODDLERS!! JAVIER FERNÁNDEZ-MACHO CONTENTS 1. Access to the econometric software 3 2. Loading and saving data: the File menu 3 2.1. A new data set: 3 2.2. An existent data set: 3 2.3. Importing

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

Two-Stage Least Squares

Two-Stage Least Squares Chapter 316 Two-Stage Least Squares Introduction This procedure calculates the two-stage least squares (2SLS) estimate. This method is used fit models that include instrumental variables. 2SLS includes

More information

Minitab 17 commands Prepared by Jeffrey S. Simonoff

Minitab 17 commands Prepared by Jeffrey S. Simonoff Minitab 17 commands Prepared by Jeffrey S. Simonoff Data entry and manipulation To enter data by hand, click on the Worksheet window, and enter the values in as you would in any spreadsheet. To then save

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

GETTING STARTED WITH STATA. Sébastien Fontenay ECON - IRES

GETTING STARTED WITH STATA. Sébastien Fontenay ECON - IRES GETTING STARTED WITH STATA Sébastien Fontenay ECON - IRES THE SOFTWARE Software developed in 1985 by StataCorp Functionalities Data management Statistical analysis Graphics Using Stata at UCL Computer

More information

A quick introduction to STATA:

A quick introduction to STATA: 1 Revised September 2008 A quick introduction to STATA: (by E. Bernhardsen, with additions by H. Goldstein) 1. How to access STATA from the pc s at the computer lab After having logged in you have to log

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

Using Large Data Sets Workbook Version A (MEI)

Using Large Data Sets Workbook Version A (MEI) Using Large Data Sets Workbook Version A (MEI) 1 Index Key Skills Page 3 Becoming familiar with the dataset Page 3 Sorting and filtering the dataset Page 4 Producing a table of summary statistics with

More information

ECON Stata course, 3rd session

ECON Stata course, 3rd session ECON4150 - Stata course, 3rd session Andrea Papini Heavily based on last year s session by Tarjei Havnes February 4, 2016 Stata course, 3rd session February 4, 2016 1 / 19 Before we start 1. Download caschool.dta

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

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SAS SAS (originally Statistical Analysis Software ) is a commercial statistical software package based on a powerful programming

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

An Introduction to Stata Part II: Data Analysis

An Introduction to Stata Part II: Data Analysis An Introduction to Stata Part II: Data Analysis Kerry L. Papps 1. Overview Do-files Sorting a dataset Combining datasets Creating a dataset of means or medians etc. Weights Panel data capabilities Dummy

More information

A quick introduction to STATA:

A quick introduction to STATA: 1 HG Revised September 2011 A quick introduction to STATA: (by E. Bernhardsen, with additions by H. Goldstein) 1. How to access STATA from the pc s at the computer lab and elsewhere at UiO. At the computer

More information

Introduction to Stata Session 3

Introduction to Stata Session 3 Introduction to Stata Session 3 Tarjei Havnes 1 ESOP and Department of Economics University of Oslo 2 Research department Statistics Norway ECON 3150/4150, UiO, 2015 Before we start 1. In your folder statacourse:

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

ST Lab 1 - The basics of SAS

ST Lab 1 - The basics of SAS ST 512 - Lab 1 - The basics of SAS What is SAS? SAS is a programming language based in C. For the most part SAS works in procedures called proc s. For instance, to do a correlation analysis there is proc

More information

Labor Economics with STATA. Estimating the Human Capital Model Using Artificial Data

Labor Economics with STATA. Estimating the Human Capital Model Using Artificial Data Labor Economics with STATA Liyousew G. Borga December 2, 2015 Estimating the Human Capital Model Using Artificial Data Liyou Borga Labor Economics with STATA December 2, 2015 84 / 105 Outline 1 The Human

More information

3. Saving Your Work: You will want to save your work periodically, especially during long exercises.

3. Saving Your Work: You will want to save your work periodically, especially during long exercises. Graphing and Data Transformation in Excel ECON 285 Chris Georges This is a brief tutorial in Excel and a first data exercise for the course. The tutorial is written for a novice user of Excel and is not

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

MPhil computer package lesson: getting started with Eviews

MPhil computer package lesson: getting started with Eviews MPhil computer package lesson: getting started with Eviews Ryoko Ito (ri239@cam.ac.uk, itoryoko@gmail.com, www.itoryoko.com ) 1. Creating an Eviews workfile 1.1. Download Wage data.xlsx from my homepage:

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

An Introductory Guide to Stata

An Introductory Guide to Stata An Introductory Guide to Stata Scott L. Minkoff Assistant Professor Department of Political Science Barnard College sminkoff@barnard.edu Updated: July 9, 2012 1 TABLE OF CONTENTS ABOUT THIS GUIDE... 4

More information

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

STATA 12 Tutorial. by Manfred W. Keil. to Accompany. Introduction to Econometrics. by James H. Stock and Mark W. Watson STATA 12 Tutorial by Manfred W. Keil to Accompany Introduction to Econometrics by James H. Stock and Mark W. Watson ------------------------------------------------------------------------------------------------------------------

More information

Your Name: Section: INTRODUCTION TO STATISTICAL REASONING Computer Lab #4 Scatterplots and Regression

Your Name: Section: INTRODUCTION TO STATISTICAL REASONING Computer Lab #4 Scatterplots and Regression Your Name: Section: 36-201 INTRODUCTION TO STATISTICAL REASONING Computer Lab #4 Scatterplots and Regression Objectives: 1. To learn how to interpret scatterplots. Specifically you will investigate, using

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

Getting started with Stata 2017: Cheat-sheet

Getting started with Stata 2017: Cheat-sheet Getting started with Stata 2017: Cheat-sheet 4. september 2017 1 Get started Graphical user interface (GUI). Clickable. Simple. Commands. Allows for use of do-le. Easy to keep track. Command window: Write

More information

Introduction to STATA

Introduction to STATA Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 rsg@american.edu (202) 885-3862 Introduction to STATA WORKSHOP OBJECTIVE: This workshop

More information

Bivariate Linear Regression James M. Murray, Ph.D. University of Wisconsin - La Crosse Updated: October 04, 2017

Bivariate Linear Regression James M. Murray, Ph.D. University of Wisconsin - La Crosse Updated: October 04, 2017 Bivariate Linear Regression James M. Murray, Ph.D. University of Wisconsin - La Crosse Updated: October 4, 217 PDF file location: http://www.murraylax.org/rtutorials/regression_intro.pdf HTML file location:

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

1 Introduction to Using Excel Spreadsheets

1 Introduction to Using Excel Spreadsheets Survey of Math: Excel Spreadsheet Guide (for Excel 2007) Page 1 of 6 1 Introduction to Using Excel Spreadsheets This section of the guide is based on the file (a faux grade sheet created for messing with)

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

Intro to E-Views. E-views is a statistical package useful for cross sectional, time series and panel data statistical analysis.

Intro to E-Views. E-views is a statistical package useful for cross sectional, time series and panel data statistical analysis. Center for Teaching, Research & Learning Research Support Group at the CTRL Lab American University, Washington, D.C. http://www.american.edu/provost/ctrl/ 202-885-3862 Intro to E-Views E-views is a statistical

More information

Creating a data file and entering data

Creating a data file and entering data 4 Creating a data file and entering data There are a number of stages in the process of setting up a data file and analysing the data. The flow chart shown on the next page outlines the main steps that

More information

Econometrics I: OLS. Dean Fantazzini. Dipartimento di Economia Politica e Metodi Quantitativi. University of Pavia

Econometrics I: OLS. Dean Fantazzini. Dipartimento di Economia Politica e Metodi Quantitativi. University of Pavia Dipartimento di Economia Politica e Metodi Quantitativi University of Pavia Overview of the Lecture 1 st EViews Session I: Convergence in the Solow Model 2 Overview of the Lecture 1 st EViews Session I:

More information

Statistical Good Practice Guidelines. 1. Introduction. Contents. SSC home Using Excel for Statistics - Tips and Warnings

Statistical Good Practice Guidelines. 1. Introduction. Contents. SSC home Using Excel for Statistics - Tips and Warnings Statistical Good Practice Guidelines SSC home Using Excel for Statistics - Tips and Warnings On-line version 2 - March 2001 This is one in a series of guides for research and support staff involved in

More information

Week - 01 Lecture - 04 Downloading and installing Python

Week - 01 Lecture - 04 Downloading and installing Python Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and

More information

Serial Correlation and Heteroscedasticity in Time series Regressions. Econometric (EC3090) - Week 11 Agustín Bénétrix

Serial Correlation and Heteroscedasticity in Time series Regressions. Econometric (EC3090) - Week 11 Agustín Bénétrix Serial Correlation and Heteroscedasticity in Time series Regressions Econometric (EC3090) - Week 11 Agustín Bénétrix 1 Properties of OLS with serially correlated errors OLS still unbiased and consistent

More information

Survey of Math: Excel Spreadsheet Guide (for Excel 2016) Page 1 of 9

Survey of Math: Excel Spreadsheet Guide (for Excel 2016) Page 1 of 9 Survey of Math: Excel Spreadsheet Guide (for Excel 2016) Page 1 of 9 Contents 1 Introduction to Using Excel Spreadsheets 2 1.1 A Serious Note About Data Security.................................... 2 1.2

More information

Introduction to gretl

Introduction to gretl Introduction to gretl Applied Economics Department of Economics Universidad Carlos III de Madrid Outline 1 What is gretl? 2 gretl Basics 3 Importing Data 4 Saving as gretl File 5 Running a Script 6 First

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

An Introduction To Stata and Matlab. Liugang Sheng ECN 240A UC Davis

An Introduction To Stata and Matlab. Liugang Sheng ECN 240A UC Davis An Introduction To Stata and Matlab Liugang Sheng ECN 240A UC Davis Stata and Matlab in our Lab Go to the admin webpage http://admin.econ.ucdavis.edu/computing/ Follow the instruction http://admin.econ.ucdavis.edu/computing/ts_windows/t

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

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

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

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below. Graphing in Excel featuring Excel 2007 1 A spreadsheet can be a powerful tool for analyzing and graphing data, but it works completely differently from the graphing calculator that you re used to. If you

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

STATS PAD USER MANUAL

STATS PAD USER MANUAL STATS PAD USER MANUAL For Version 2.0 Manual Version 2.0 1 Table of Contents Basic Navigation! 3 Settings! 7 Entering Data! 7 Sharing Data! 8 Managing Files! 10 Running Tests! 11 Interpreting Output! 11

More information

Excel Assignment 4: Correlation and Linear Regression (Office 2016 Version)

Excel Assignment 4: Correlation and Linear Regression (Office 2016 Version) Economics 225, Spring 2018, Yang Zhou Excel Assignment 4: Correlation and Linear Regression (Office 2016 Version) 30 Points Total, Submit via ecampus by 8:00 AM on Tuesday, May 1, 2018 Please read all

More information

Birkbeck College Department of Economics, Mathematics and Statistics.

Birkbeck College Department of Economics, Mathematics and Statistics. Birkbeck College Department of Economics, Mathematics and Statistics. Graduate Certificates and Diplomas Economics, Finance, Financial Engineering 2012 Applied Statistics and Econometrics INTRODUCTION

More information

Econometric Tools 1: Non-Parametric Methods

Econometric Tools 1: Non-Parametric Methods University of California, Santa Cruz Department of Economics ECON 294A (Fall 2014) - Stata Lab Instructor: Manuel Barron 1 Econometric Tools 1: Non-Parametric Methods 1 Introduction This lecture introduces

More information

STM103 Spring 2008 INTRODUCTION TO STATA 8.0

STM103 Spring 2008 INTRODUCTION TO STATA 8.0 STM103 Spring 2008 INTRODUCTION TO STATA 8.0 1. PREPARING BEFORE ENTERING THE LAB... 2 Getting the shared dataset... 2 Assignment 1 preparation... 2 2. STARTING A STATA SESSION... 3 Opening, Saving, and

More information

Graphical Analysis of Data using Microsoft Excel [2016 Version]

Graphical Analysis of Data using Microsoft Excel [2016 Version] Graphical Analysis of Data using Microsoft Excel [2016 Version] Introduction In several upcoming labs, a primary goal will be to determine the mathematical relationship between two variable physical parameters.

More information

Here is Kellogg s custom menu for their core statistics class, which can be loaded by typing the do statement shown in the command window at the very

Here is Kellogg s custom menu for their core statistics class, which can be loaded by typing the do statement shown in the command window at the very Here is Kellogg s custom menu for their core statistics class, which can be loaded by typing the do statement shown in the command window at the very bottom of the screen: 4 The univariate statistics command

More information

Section 3.4: Diagnostics and Transformations. Jared S. Murray The University of Texas at Austin McCombs School of Business

Section 3.4: Diagnostics and Transformations. Jared S. Murray The University of Texas at Austin McCombs School of Business Section 3.4: Diagnostics and Transformations Jared S. Murray The University of Texas at Austin McCombs School of Business 1 Regression Model Assumptions Y i = β 0 + β 1 X i + ɛ Recall the key assumptions

More information

Graphing and Data Transformation in Excel ECON 285 Chris Georges

Graphing and Data Transformation in Excel ECON 285 Chris Georges Graphing and Data Transformation in Excel ECON 285 Chris Georges This is a brief tutorial in Excel and a first data exercise for the course. The tutorial is written for a novice user of Excel and is not

More information

Part I, Chapters 4 & 5. Data Tables and Data Analysis Statistics and Figures

Part I, Chapters 4 & 5. Data Tables and Data Analysis Statistics and Figures Part I, Chapters 4 & 5 Data Tables and Data Analysis Statistics and Figures Descriptive Statistics 1 Are data points clumped? (order variable / exp. variable) Concentrated around one value? Concentrated

More information

CSSCR Excel Intermediate 4/13/06 GH Page 1 of 23 INTERMEDIATE EXCEL

CSSCR Excel Intermediate 4/13/06 GH Page 1 of 23 INTERMEDIATE EXCEL CSSCR Excel Intermediate 4/13/06 GH Page 1 of 23 INTERMEDIATE EXCEL This document is for those who already know the basics of spreadsheets and have worked with either Excel for Windows or Excel for Macintosh.

More information

Introduction. About this Document. What is SPSS. ohow to get SPSS. oopening Data

Introduction. About this Document. What is SPSS. ohow to get SPSS. oopening Data Introduction About this Document This manual was written by members of the Statistical Consulting Program as an introduction to SPSS 12.0. It is designed to assist new users in familiarizing themselves

More information

MINITAB 17 BASICS REFERENCE GUIDE

MINITAB 17 BASICS REFERENCE GUIDE MINITAB 17 BASICS REFERENCE GUIDE Dr. Nancy Pfenning September 2013 After starting MINITAB, you'll see a Session window above and a worksheet below. The Session window displays non-graphical output such

More information

Chapter One: Getting Started With IBM SPSS for Windows

Chapter One: Getting Started With IBM SPSS for Windows Chapter One: Getting Started With IBM SPSS for Windows Using Windows The Windows start-up screen should look something like Figure 1-1. Several standard desktop icons will always appear on start up. Note

More information

Stata: A Brief Introduction Biostatistics

Stata: A Brief Introduction Biostatistics Stata: A Brief Introduction Biostatistics 140.621 2005-2006 1. Statistical Packages There are many statistical packages (Stata, SPSS, SAS, Splus, etc.) Statistical packages can be used for Analysis Data

More information

StatCalc User Manual. Version 9 for Mac and Windows. Copyright 2018, AcaStat Software. All rights Reserved.

StatCalc User Manual. Version 9 for Mac and Windows. Copyright 2018, AcaStat Software. All rights Reserved. StatCalc User Manual Version 9 for Mac and Windows Copyright 2018, AcaStat Software. All rights Reserved. http://www.acastat.com Table of Contents Introduction... 4 Getting Help... 4 Uninstalling StatCalc...

More information

Introduction to Stata - Session 1

Introduction to Stata - Session 1 Introduction to Stata - Session 1 Simon, Hong based on Andrea Papini ECON 3150/4150, UiO January 15, 2018 1 / 33 Preparation Before we start Sit in teams of two Download the file auto.dta from the course

More information

(Updated 29 Oct 2016)

(Updated 29 Oct 2016) (Updated 29 Oct 2016) 1 Class Maker 2016 Program Description Creating classes for the new school year is a time consuming task that teachers are asked to complete each year. Many schools offer their students

More information

Can double click the data file and it should open STATA

Can double click the data file and it should open STATA ECO 445: International Trade Professor Jack Rossbach Instructions on Doing Gravity Regressions in STATA Important: If you don t know how to use a command, use the help command in R. For example, type help

More information

An Introduction to Stata Exercise 1

An Introduction to Stata Exercise 1 An Introduction to Stata Exercise 1 Anna Folke Larsen, September 2016 1 Table of Contents 1 Introduction... 1 2 Initial options... 3 3 Reading a data set from a spreadsheet... 5 4 Descriptive statistics...

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

Section 3.2: Multiple Linear Regression II. Jared S. Murray The University of Texas at Austin McCombs School of Business

Section 3.2: Multiple Linear Regression II. Jared S. Murray The University of Texas at Austin McCombs School of Business Section 3.2: Multiple Linear Regression II Jared S. Murray The University of Texas at Austin McCombs School of Business 1 Multiple Linear Regression: Inference and Understanding We can answer new questions

More information

Applied Regression Modeling: A Business Approach

Applied Regression Modeling: A Business Approach i Applied Regression Modeling: A Business Approach Computer software help: SPSS SPSS (originally Statistical Package for the Social Sciences ) is a commercial statistical software package with an easy-to-use

More information

Using Excel for Graphical Analysis of Data

Using Excel for Graphical Analysis of Data Using Excel for Graphical Analysis of Data Introduction In several upcoming labs, a primary goal will be to determine the mathematical relationship between two variable physical parameters. Graphs are

More information

A. Using the data provided above, calculate the sampling variance and standard error for S for each week s data.

A. Using the data provided above, calculate the sampling variance and standard error for S for each week s data. WILD 502 Lab 1 Estimating Survival when Animal Fates are Known Today s lab will give you hands-on experience with estimating survival rates using logistic regression to estimate the parameters in a variety

More information

Further Maths Notes. Common Mistakes. Read the bold words in the exam! Always check data entry. Write equations in terms of variables

Further Maths Notes. Common Mistakes. Read the bold words in the exam! Always check data entry. Write equations in terms of variables Further Maths Notes Common Mistakes Read the bold words in the exam! Always check data entry Remember to interpret data with the multipliers specified (e.g. in thousands) Write equations in terms of variables

More information

How to use FSBforecast Excel add in for regression analysis

How to use FSBforecast Excel add in for regression analysis How to use FSBforecast Excel add in for regression analysis FSBforecast is an Excel add in for data analysis and regression that was developed here at the Fuqua School of Business over the last 3 years

More information

set mem 10m we can also decide to have the more separation line on the screen or not when the software displays results: set more on set more off

set mem 10m we can also decide to have the more separation line on the screen or not when the software displays results: set more on set more off Setting up Stata We are going to allocate 10 megabites to the dataset. You do not want to allocate to much memory to the dataset because the more memory you allocate to the dataset, the less memory will

More information

SAS Enterprise Miner : Tutorials and Examples

SAS Enterprise Miner : Tutorials and Examples SAS Enterprise Miner : Tutorials and Examples SAS Documentation February 13, 2018 The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2017. SAS Enterprise Miner : Tutorials

More information

Exploring G7. Fall 2009

Exploring G7. Fall 2009 Exploring G7 Fall 2009 The G7 program is a powerful and free program developed by Inforum at the University of Maryland. It can be used to build or access databanks containing millions of time series.

More information

Sacha Kapoor - Masters Metrics

Sacha Kapoor - Masters Metrics Sacha Kapoor - Masters Metrics 091610 1 Address: Max Gluskin House, 150 St.George, Rm 329 Email: sacha.kapoor@utoronto.ca Web: http://individual.utoronto.ca/sacha$_$kapoor 1 Basics Here are some data resources

More information

Tips and Guidance for Analyzing Data. Executive Summary

Tips and Guidance for Analyzing Data. Executive Summary Tips and Guidance for Analyzing Data Executive Summary This document has information and suggestions about three things: 1) how to quickly do a preliminary analysis of time-series data; 2) key things to

More information

Intro to Stata. University of Virginia Library data.library.virginia.edu. September 16, 2014

Intro to Stata. University of Virginia Library data.library.virginia.edu. September 16, 2014 to 1/12 Intro to University of Virginia Library data.library.virginia.edu September 16, 2014 Getting to Know to 2/12 Strengths Available A full-featured statistical programming language For Windows, Mac

More information

How to use FSBForecast Excel add-in for regression analysis (July 2012 version)

How to use FSBForecast Excel add-in for regression analysis (July 2012 version) How to use FSBForecast Excel add-in for regression analysis (July 2012 version) FSBForecast is an Excel add-in for data analysis and regression that was developed at the Fuqua School of Business over the

More information

Chapter 2 Assignment (due Thursday, April 19)

Chapter 2 Assignment (due Thursday, April 19) (due Thursday, April 19) Introduction: The purpose of this assignment is to analyze data sets by creating histograms and scatterplots. You will use the STATDISK program for both. Therefore, you should

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

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

Session 2: Fixed and Random Effects Estimation

Session 2: Fixed and Random Effects Estimation Session 2: Fixed and Random Effects Estimation Principal, Developing Trade Consultants Ltd. ARTNeT/RIS Capacity Building Workshop on the Use of Gravity Modeling Thursday, November 10, 2011 1 Outline Fixed

More information

SYS 6021 Linear Statistical Models

SYS 6021 Linear Statistical Models SYS 6021 Linear Statistical Models Project 2 Spam Filters Jinghe Zhang Summary The spambase data and time indexed counts of spams and hams are studied to develop accurate spam filters. Static models are

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

Section 2.3: Simple Linear Regression: Predictions and Inference

Section 2.3: Simple Linear Regression: Predictions and Inference Section 2.3: Simple Linear Regression: Predictions and Inference Jared S. Murray The University of Texas at Austin McCombs School of Business Suggested reading: OpenIntro Statistics, Chapter 7.4 1 Simple

More information

Activity 1 Creating a simple gradebook

Activity 1 Creating a simple gradebook Activity 1 Creating a simple gradebook 1 Launch Excel to start a new spreadsheet a. Click on the Excel icon to start a new workbook, either from the start menu, Office Toolbar, or an Excel icon on the

More information

Intro to Stata for Political Scientists

Intro to Stata for Political Scientists Intro to Stata for Political Scientists Andrew S. Rosenberg Junior PRISM Fellow Department of Political Science Workshop Description This is an Introduction to Stata I will assume little/no prior knowledge

More information

STAT 2607 REVIEW PROBLEMS Word problems must be answered in words of the problem.

STAT 2607 REVIEW PROBLEMS Word problems must be answered in words of the problem. STAT 2607 REVIEW PROBLEMS 1 REMINDER: On the final exam 1. Word problems must be answered in words of the problem. 2. "Test" means that you must carry out a formal hypothesis testing procedure with H0,

More information

Excel Primer CH141 Fall, 2017

Excel Primer CH141 Fall, 2017 Excel Primer CH141 Fall, 2017 To Start Excel : Click on the Excel icon found in the lower menu dock. Once Excel Workbook Gallery opens double click on Excel Workbook. A blank workbook page should appear

More information

Chapter 2 Assignment (due Thursday, October 5)

Chapter 2 Assignment (due Thursday, October 5) (due Thursday, October 5) Introduction: The purpose of this assignment is to analyze data sets by creating histograms and scatterplots. You will use the STATDISK program for both. Therefore, you should

More information

Exploring Econometric Model Selection Using Sensitivity Analysis

Exploring Econometric Model Selection Using Sensitivity Analysis Exploring Econometric Model Selection Using Sensitivity Analysis William Becker Paolo Paruolo Andrea Saltelli Nice, 2 nd July 2013 Outline What is the problem we are addressing? Past approaches Hoover

More information

MFx Macroeconomic Forecasting

MFx Macroeconomic Forecasting MFx Macroeconomic Forecasting Module: Introduction to EViews Note: This presentation serves as an outline of the topics discussed in the videos for this module. IMFx This training material is the property

More information

Lab 1. Introduction to R & SAS. R is free, open-source software. Get it here:

Lab 1. Introduction to R & SAS. R is free, open-source software. Get it here: Lab 1. Introduction to R & SAS R is free, open-source software. Get it here: http://tinyurl.com/yfet8mj for your own computer. 1.1. Using R like a calculator Open R and type these commands into the R Console

More information

Lab 1: Getting started with R and RStudio Questions? or

Lab 1: Getting started with R and RStudio Questions? or Lab 1: Getting started with R and RStudio Questions? david.montwe@ualberta.ca or isaacren@ualberta.ca 1. Installing R and RStudio To install R, go to https://cran.r-project.org/ and click on the Download

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