# From the help desk: Swamy s random-coefficients model

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 The Stata Journal (2003) 3, Number 3, pp From the help desk: Swamy s random-coefficients model Brian P. Poi Stata Corporation Abstract. This article discusses the Swamy (1970) random-coefficients model and presents a command that extends Stata s xtrchh command by also providing estimates of the panel-specific coefficients. Keywords: st0046, panel data, random-coefficients models 1 Introduction Fixed- and random-effects models incorporate panel-specific heterogeneity by including a set of nuisance parameters that essentially provide each panel with its own constant term. However, all panels share common slope parameters. Random-coefficients models are more general in that they allow each panel to have its own vector of slopes randomly drawn from a distribution common to all panels. Stata s xtrchh command provides estimates of the parameters characterizing the distribution from which the panel-specific parameters are drawn. The command included with this article extends Stata s implementation by also providing best linear unbiased predictors of the panel-specific draws from that distribution. Section 2 develops the Swamy (1970) random-coefficients model. Section 3 then presents the syntax and usage of a command called xtrchh2 that implements the estimator in Stata, and section 4 presents an example. Section 5 lists the results stored by xtrchh2. 2 Swamy s random-coefficients model Following Swamy (1970), consider a random-coefficients model of the form y i = X i β i + ǫ i (1) where i =1...P denotes panels, y i is a T i 1 vector of observations for the ith panel, X i is a T i k matrix of nonstochastic covariates, and β i is a k 1 vector of parameters specific to panel i. The error term vector ǫ i is distributed with mean zero and variance σ ii I. The panels do not need to be balanced. Each panel-specific β i is related to an underlying common parameter vector β: β i = β + v i (2) c 2003 Stata Corporation st0046

2 B. P. Poi 303 where E{v i } = 0, E{v i v i } = Σ, E{v iv j } = 0 for j i, ande{v iǫ j } = 0 for all i and j. Combining (1)and(2), with u i X i v i + ǫ i.moreover, y i = X i (β + v i )+ǫ i = X i β + u i E{u i u i} = E{(X i v i + ǫ i )(X i v i + ǫ i ) } = X i ΣX i + σ ii I Π i Stacking the equations for the P panels, where y = Xβ + u (3) Π Π E{uu 0 Π 2 0 } = Π P Estimating the parameters of (3) is a standard problem in generalized least squares (GLS), so β = ( X Π 1 X ) 1 X Π 1 y ( ) 1 = X i i X iπ 1 i = i W ib i i X iπ 1 i y i (4) where [ ( ) } ] W i = {Σ + σ jj X { ( ) } j X j Σ + σ ii X 1 1 i X i j and b i ( X ix i ) 1 X i y i, showing that β is a weighted average of the panel-specific OLS estimates. The final equality in (4) makes use of the fact that ( A + BDB ) 1 = A 1 A 1 BEB A 1 + A 1 BE(E + D) 1 EBA 1 where E (B A 1 B) 1. See Rao (1973, 33). The variance of β is Var( β)= ( X Π 1 X ) 1 = i { Σ + σii (X ix i ) 1} 1 In addition to estimating β, one often wishes to obtain estimates of the panel-specific β i vectors as well. As discussed by Judge et al. (1985, 541), if attention is restricted

3 304 From the help desk to the class of estimators {β i } for which E {β i β i } = β i, then the panel-specific OLS estimator b i is appropriate. However, if one does not condition on β i, then the best linear unbiased predictor is β i = β + ΣX ( i Xi ΣX i + σ ii I ) ( ) 1 y i X i β = ( Σ 1 + σ 1 ) 1 ( ii X ix i σ 1 ii X ix i b i + Σ 1 β ) Greene (1997, 672) suggests using the following method to obtain the variance of β i. Define A i ( Σ 1 + σ 1 ) 1 ii X ix i Σ 1. Then β i = [ A i (I A i ) ][ ] β b i and Var( β i )= [ A i (I A i ) ] ( )[ β A ] i Var (I A i ) b i Note that ( ) [ ] β Var( β) Cov( β,b Var = i ) Cov( β,b i ) Var(b i ) b i The GLS estimator β is both consistent and efficient; and, although inefficient, b i is nevertheless also a consistent estimator of β. Thus, making use of Lemma 2.1 of Hausman (1978), Asy.Cov( β,b i )=Asy.Var( β) Asy.Cov( β, β b i )=Asy.Var( β). After some algebraic manipulation, { } Asy.Var( β i )=Var( β)+(i A i ) Var(b i ) Var( β) (I A i ) To make the above formulas feasible, each σ ii may be replaced with the consistent OLS estimate σ ii = (y i X i b i ) (y i X i b i ) T i k Swamy (1970) showed that a consistent estimator of Σ is ( Σ = 1 P ) b i b i Pbb 1 P σ ii (X P 1 P ix i ) 1 where b 1 P i b i. However, that estimator may not always be positive definite in finite samples. A practical solution is to ignore the final term, and both Stata s xtrchh command and the xtrchh2 command accompanying this article do that. A natural question to ask is whether the panel-specific β i s differ significantly from one another. Under the null hypothesis H 0 : β 1 = β 2 = = β P (5)

4 B. P. Poi 305 the test statistic where T β P (b i β ) { P { σ 1 σ 1 ii (X ix i ) ii (X ix i ) } (b i β ) } 1 P is distributed χ 2 with k(p 1) degrees of freedom. 3 Stata implementation 3.1 Syntax σ 1 ii (X ix i )b i xtrchh2 depvar varlist [ if exp ][ in range ][,i(varname) t(varname) level(#) offset(varname) noconstant nobetas ] Syntax for predict predict [ type ] newvarname [ if exp ][ in range ][, [ xb stdp xbi ] group(#) nooffset ] 3.2 Options i(varname) specifies the variable that contains the unit to which the observation belongs. You can specify the i() option the first time you estimate, or you can use the iis command to set i() beforehand. Note that it is not necessary to specify i() if the data have been previously tsset, or if iis has been previously specified in these cases, the group variable is taken from the previous setting. See [XT] xt. t(varname) specifies the variable that contains the time at which the observation was made. You can specify the t() option the first time you estimate, or you can use the tis command to set t() beforehand. Note that it is not necessary to specify t() if the data have been previously tsset, or if tis has been previously specified in these cases, the time variable is taken from the previous setting. See [XT] xt. level(#) specifies the confidence level, in percent, for confidence intervals. The default is level(95) or as set by set level; see[u] 23.6 Specifying the width of confidence intervals. offset(varname) specifies that varname is to be included in the model with its coefficient constrained to be 1. noconstant suppresses the constant term (intercept) in the regression. nobetas requests that the panel-specific β i s not be displayed.

5 306 From the help desk Options for predict xb, the default, calculates the linear prediction based on β. stdp calculates the standard error of the linear prediction based on β. xbi calculates the linear prediction based on the group-specific β i, where i is specified with the group(#) option. The predictions are calculated for all available observations in the dataset, not just those in group i; youcanuseif or in to restrict that behavior. group(#) specifies which group-specific β i to use with the xbi option. The default is group(1). group(#) has no effect if xbi is not specified. nooffset is relevant only if you specified offset(varname) for xtrchh2. It modifies the calculations made by predict so that they ignore the offset variable; the linear prediction is treated as x it b instead of x it b +offset it. 3.3 Remarks The xtrchh2 command fits Swamy s random-coefficients model as described in the previous section. The estimates of β are identical to those produced byxtrchh. Additionally, xtrchh2 displays the best linear unbiased estimates of the panel-specific coefficients; an option allows that output to be suppressed. Note that one can simply use the statsby command to obtain the panel-specific OLS estimates if they are desired. Saved results are stored in e() macros; see Saved results below. 4 Example To illustrate the usage of xtrchh2, the following example uses the same dataset as [XT] xtrchh.. webuse invest2, clear. xtrchh2 invest market stock, i(company) t(time) The output is shown on the next page. The header displays the number of observations and summarizes the structure of the panel data. It also contains a Wald test of the joint significance of the slope parameters in β. Below the estimate of β is the test statistic for the null hypothesis shown in (5). The remainder of the output consists of the estimated panel-specific β i s. (Continued on next page)

6 B. P. Poi 307 Swamy random-coefficients regression Number of obs = 100 Group variable (i): company Number of groups = 5 Obs per group: min = 20 avg = 20.0 max = 20 Wald chi2(2) = Prob > chi2 = invest Coef. Std. Err. z P> z [95% Conf. Interval] market stock _cons Test of parameter constancy: chi2(12) = Prob > chi2 = Group 1 Group-specific coefficients Coef. Std. Err. z P> z [95% Conf. Interval] market stock _cons Group 2 market stock _cons Group 3 market stock _cons Group 4 market stock _cons Group 5 market stock _cons

7 308 From the help desk 5 Saved results xtrchh2 saves in e(): Scalars e(n) number of observations e(g avg) average group size e(chi2) χ 2 e(n g) number of groups e(df m) model degrees of freedom e(chi2 c) χ 2 for comparison test e(g max) largest group size e(df chi2c) degrees of freedom for e(g min) smallest group size comparison test Macros e(cmd) xtrchh2 e(depvar) name of dependent variable e(predict) program used to implement e(chi2type) Wald; typeofmodelχ 2 test predict e(title) title in estimation output e(ivar) variable denoting groups Matrices e(b) β vector e(v i) estimated Var( βi ),...P e(v) estimated Var( β) e(sigma) Σ e(beta i) βi vector,...p Functions e(sample) marks estimation sample 6 References Greene, W. H Econometric Analysis. 3d ed. Upper Saddle River, NJ: Prentice Hall. Hausman, J. A Specification tests in econometrics. Econometrica 46(6): Judge, G. G., R. C. Hill, W. E. Griffiths, H. Lütkepohl, and T. C. Lee The Theory and Practice of Econometrics. 2d ed. New York: John Wiley & Sons. Rao, C. R Linear Statistical Inference and its Applications. 2d ed. New York: John Wiley & Sons. Swamy, P. A. V Efficient inference in a random coefficient regression model. Econometrica 38: About the Author Brian P. Poi received his Ph.D. in economics from the University of Michigan and joined Stata Corporation as a staff statistician.

### Lab 5 Linear Regression with Within-subject Correlation. Goals: Data: Use the pig data which is in wide format:

Lab 5 Linear Regression with Within-subject Correlation Goals: Data: Fit linear regression models that account for within-subject correlation using Stata. Compare weighted least square, GEE, and random

### Please follow the directions once you locate the Stata software in your computer. Room 114 (Business Lab) has computers with Stata software

STATA Tutorial Professor Erdinç Please follow the directions once you locate the Stata software in your computer. Room 114 (Business Lab) has computers with Stata software 1.Wald Test Wald Test is used

### Testing for serial correlation in linear panel-data models

The Stata Journal (2003) 3, Number 2, pp. 168 177 Testing for serial correlation in linear panel-data models David M. Drukker Stata Corporation Abstract. Because serial correlation in linear panel-data

### Sample Size Calculation for Longitudinal Studies

Sample Size Calculation for Longitudinal Studies Phil Schumm Department of Health Studies University of Chicago August 23, 2004 (Supported by National Institute on Aging grant P01 AG18911-01A1) Introduction

### Title. Syntax. nlcom Nonlinear combinations of estimators. Nonlinear combination of estimators one expression. nlcom [ name: ] exp [, options ]

Title nlcom Nonlinear combinations of estimators Syntax Nonlinear combination of estimators one expression nlcom [ name: ] exp [, options ] Nonlinear combinations of estimators more than one expression

### From the help desk: hurdle models

The Stata Journal (2003) 3, Number 2, pp. 178 184 From the help desk: hurdle models Allen McDowell Stata Corporation Abstract. This article demonstrates that, although there is no command in Stata for

### Standard errors of marginal effects in the heteroskedastic probit model

Standard errors of marginal effects in the heteroskedastic probit model Thomas Cornelißen Discussion Paper No. 320 August 2005 ISSN: 0949 9962 Abstract In non-linear regression models, such as the heteroskedastic

### Clustering in the Linear Model

Short Guides to Microeconometrics Fall 2014 Kurt Schmidheiny Universität Basel Clustering in the Linear Model 2 1 Introduction Clustering in the Linear Model This handout extends the handout on The Multiple

### Econ 371 Problem Set #3 Answer Sheet

Econ 371 Problem Set #3 Answer Sheet 4.3 In this question, you are told that a OLS regression analysis of average weekly earnings yields the following estimated model. AW E = 696.7 + 9.6 Age, R 2 = 0.023,

### From the help desk: Demand system estimation

The Stata Journal (2002) 2, Number 4, pp. 403 410 From the help desk: Demand system estimation Brian P. Poi Stata Corporation Abstract. This article provides an example illustrating how to use Stata to

### ECON 142 SKETCH OF SOLUTIONS FOR APPLIED EXERCISE #2

University of California, Berkeley Prof. Ken Chay Department of Economics Fall Semester, 005 ECON 14 SKETCH OF SOLUTIONS FOR APPLIED EXERCISE # Question 1: a. Below are the scatter plots of hourly wages

### DETERMINANTS OF CAPITAL ADEQUACY RATIO IN SELECTED BOSNIAN BANKS

DETERMINANTS OF CAPITAL ADEQUACY RATIO IN SELECTED BOSNIAN BANKS Nađa DRECA International University of Sarajevo nadja.dreca@students.ius.edu.ba Abstract The analysis of a data set of observation for 10

### An introduction to GMM estimation using Stata

An introduction to GMM estimation using Stata David M. Drukker StataCorp German Stata Users Group Berlin June 2010 1 / 29 Outline 1 A quick introduction to GMM 2 Using the gmm command 2 / 29 A quick introduction

### Correlated Random Effects Panel Data Models

INTRODUCTION AND LINEAR MODELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. The Linear

### From the help desk: Bootstrapped standard errors

The Stata Journal (2003) 3, Number 1, pp. 71 80 From the help desk: Bootstrapped standard errors Weihua Guan Stata Corporation Abstract. Bootstrapping is a nonparametric approach for evaluating the distribution

### SYSTEMS OF REGRESSION EQUATIONS

SYSTEMS OF REGRESSION EQUATIONS 1. MULTIPLE EQUATIONS y nt = x nt n + u nt, n = 1,...,N, t = 1,...,T, x nt is 1 k, and n is k 1. This is a version of the standard regression model where the observations

### A Panel Data Analysis of Corporate Attributes and Stock Prices for Indian Manufacturing Sector

Journal of Modern Accounting and Auditing, ISSN 1548-6583 November 2013, Vol. 9, No. 11, 1519-1525 D DAVID PUBLISHING A Panel Data Analysis of Corporate Attributes and Stock Prices for Indian Manufacturing

### Introduction to Stata

Introduction to Stata September 23, 2014 Stata is one of a few statistical analysis programs that social scientists use. Stata is in the mid-range of how easy it is to use. Other options include SPSS,

### Milk Data Analysis. 1. Objective Introduction to SAS PROC MIXED Analyzing protein milk data using STATA Refit protein milk data using PROC MIXED

1. Objective Introduction to SAS PROC MIXED Analyzing protein milk data using STATA Refit protein milk data using PROC MIXED 2. Introduction to SAS PROC MIXED The MIXED procedure provides you with flexibility

### Least Squares Estimation

Least Squares Estimation SARA A VAN DE GEER Volume 2, pp 1041 1045 in Encyclopedia of Statistics in Behavioral Science ISBN-13: 978-0-470-86080-9 ISBN-10: 0-470-86080-4 Editors Brian S Everitt & David

### Department of Economics Session 2012/2013. EC352 Econometric Methods. Solutions to Exercises from Week 10 + 0.0077 (0.052)

Department of Economics Session 2012/2013 University of Essex Spring Term Dr Gordon Kemp EC352 Econometric Methods Solutions to Exercises from Week 10 1 Problem 13.7 This exercise refers back to Equation

### The following postestimation commands for time series are available for regress:

Title stata.com regress postestimation time series Postestimation tools for regress with time series Description Syntax for estat archlm Options for estat archlm Syntax for estat bgodfrey Options for estat

### Regression Analysis. Data Calculations Output

Regression Analysis In an attempt to find answers to questions such as those posed above, empirical labour economists use a useful tool called regression analysis. Regression analysis is essentially a

### I n d i a n a U n i v e r s i t y U n i v e r s i t y I n f o r m a t i o n T e c h n o l o g y S e r v i c e s

I n d i a n a U n i v e r s i t y U n i v e r s i t y I n f o r m a t i o n T e c h n o l o g y S e r v i c e s Linear Regression Models for Panel Data Using SAS, Stata, LIMDEP, and SPSS * Hun Myoung Park,

### III. INTRODUCTION TO LOGISTIC REGRESSION. a) Example: APACHE II Score and Mortality in Sepsis

III. INTRODUCTION TO LOGISTIC REGRESSION 1. Simple Logistic Regression a) Example: APACHE II Score and Mortality in Sepsis The following figure shows 30 day mortality in a sample of septic patients as

### Handling missing data in Stata a whirlwind tour

Handling missing data in Stata a whirlwind tour 2012 Italian Stata Users Group Meeting Jonathan Bartlett www.missingdata.org.uk 20th September 2012 1/55 Outline The problem of missing data and a principled

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

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

### REGRESSION LINES IN STATA

REGRESSION LINES IN STATA THOMAS ELLIOTT 1. Introduction to Regression Regression analysis is about eploring linear relationships between a dependent variable and one or more independent variables. Regression

### Multiple Linear Regression

Multiple Linear Regression A regression with two or more explanatory variables is called a multiple regression. Rather than modeling the mean response as a straight line, as in simple regression, it is

### Panel Data Analysis Fixed and Random Effects using Stata (v. 4.2)

Panel Data Analysis Fixed and Random Effects using Stata (v. 4.2) Oscar Torres-Reyna otorres@princeton.edu December 2007 http://dss.princeton.edu/training/ Intro Panel data (also known as longitudinal

### Notes for STA 437/1005 Methods for Multivariate Data

Notes for STA 437/1005 Methods for Multivariate Data Radford M. Neal, 26 November 2010 Random Vectors Notation: Let X be a random vector with p elements, so that X = [X 1,..., X p ], where denotes transpose.

### Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model 1 September 004 A. Introduction and assumptions The classical normal linear regression model can be written

### MULTIPLE REGRESSION EXAMPLE

MULTIPLE REGRESSION EXAMPLE For a sample of n = 166 college students, the following variables were measured: Y = height X 1 = mother s height ( momheight ) X 2 = father s height ( dadheight ) X 3 = 1 if

### Discussion Section 4 ECON 139/239 2010 Summer Term II

Discussion Section 4 ECON 139/239 2010 Summer Term II 1. Let s use the CollegeDistance.csv data again. (a) An education advocacy group argues that, on average, a person s educational attainment would increase

### Simple Linear Regression Inference

Simple Linear Regression Inference 1 Inference requirements The Normality assumption of the stochastic term e is needed for inference even if it is not a OLS requirement. Therefore we have: Interpretation

### Heteroskedasticity and Weighted Least Squares

Econ 507. Econometric Analysis. Spring 2009 April 14, 2009 The Classical Linear Model: 1 Linearity: Y = Xβ + u. 2 Strict exogeneity: E(u) = 0 3 No Multicollinearity: ρ(x) = K. 4 No heteroskedasticity/

### Lecture 15. Endogeneity & Instrumental Variable Estimation

Lecture 15. Endogeneity & Instrumental Variable Estimation Saw that measurement error (on right hand side) means that OLS will be biased (biased toward zero) Potential solution to endogeneity instrumental

### IAPRI Quantitative Analysis Capacity Building Series. Multiple regression analysis & interpreting results

IAPRI Quantitative Analysis Capacity Building Series Multiple regression analysis & interpreting results How important is R-squared? R-squared Published in Agricultural Economics 0.45 Best article of the

### DEPARTMENT OF ECONOMICS. Unit ECON 12122 Introduction to Econometrics. Notes 4 2. R and F tests

DEPARTMENT OF ECONOMICS Unit ECON 11 Introduction to Econometrics Notes 4 R and F tests These notes provide a summary of the lectures. They are not a complete account of the unit material. You should also

### Using Repeated Measures Techniques To Analyze Cluster-correlated Survey Responses

Using Repeated Measures Techniques To Analyze Cluster-correlated Survey Responses G. Gordon Brown, Celia R. Eicheldinger, and James R. Chromy RTI International, Research Triangle Park, NC 27709 Abstract

### A Simple Feasible Alternative Procedure to Estimate Models with High-Dimensional Fixed Effects

DISCUSSION PAPER SERIES IZA DP No. 3935 A Simple Feasible Alternative Procedure to Estimate Models with High-Dimensional Fixed Effects Paulo Guimarães Pedro Portugal January 2009 Forschungsinstitut zur

### August 2012 EXAMINATIONS Solution Part I

August 01 EXAMINATIONS Solution Part I (1) In a random sample of 600 eligible voters, the probability that less than 38% will be in favour of this policy is closest to (B) () In a large random sample,

### ESTIMATING AVERAGE TREATMENT EFFECTS: IV AND CONTROL FUNCTIONS, II Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics

ESTIMATING AVERAGE TREATMENT EFFECTS: IV AND CONTROL FUNCTIONS, II Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Quantile Treatment Effects 2. Control Functions

### 1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

1 Final Review 2 Review 2.1 CI 1-propZint Scenario 1 A TV manufacturer claims in its warranty brochure that in the past not more than 10 percent of its TV sets needed any repair during the first two years

### Multicollinearity Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised January 13, 2015

Multicollinearity Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised January 13, 2015 Stata Example (See appendices for full example).. use http://www.nd.edu/~rwilliam/stats2/statafiles/multicoll.dta,

### NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Chapter 340 Principal Components Regression Introduction is a technique for analyzing multiple regression data that suffer from multicollinearity. When multicollinearity occurs, least squares estimates

### Regression in Stata. Alicia Doyle Lynch Harvard-MIT Data Center (HMDC)

Regression in Stata Alicia Doyle Lynch Harvard-MIT Data Center (HMDC) Documents for Today Find class materials at: http://libraries.mit.edu/guides/subjects/data/ training/workshops.html Several formats

### Estimating the random coefficients logit model of demand using aggregate data

Estimating the random coefficients logit model of demand using aggregate data David Vincent Deloitte Economic Consulting London, UK davivincent@deloitte.co.uk September 14, 2012 Introduction Estimation

### Section 1: Simple Linear Regression

Section 1: Simple Linear Regression Carlos M. Carvalho The University of Texas McCombs School of Business http://faculty.mccombs.utexas.edu/carlos.carvalho/teaching/ 1 Regression: General Introduction

### Bivariate Regression Analysis. The beginning of many types of regression

Bivariate Regression Analysis The beginning of many types of regression TOPICS Beyond Correlation Forecasting Two points to estimate the slope Meeting the BLUE criterion The OLS method Purpose of Regression

### Chapter 13 Introduction to Linear Regression and Correlation Analysis

Chapter 3 Student Lecture Notes 3- Chapter 3 Introduction to Linear Regression and Correlation Analsis Fall 2006 Fundamentals of Business Statistics Chapter Goals To understand the methods for displaing

### Quantitative Methods for Economics Tutorial 9. Katherine Eyal

Quantitative Methods for Economics Tutorial 9 Katherine Eyal TUTORIAL 9 4 October 2010 ECO3021S Part A: Problems 1. In Problem 2 of Tutorial 7, we estimated the equation ŝleep = 3, 638.25 0.148 totwrk

### HURDLE AND SELECTION MODELS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009

HURDLE AND SELECTION MODELS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Introduction 2. A General Formulation 3. Truncated Normal Hurdle Model 4. Lognormal

### 1 Simple Linear Regression I Least Squares Estimation

Simple Linear Regression I Least Squares Estimation Textbook Sections: 8. 8.3 Previously, we have worked with a random variable x that comes from a population that is normally distributed with mean µ and

### Survey Data Analysis in Stata

Survey Data Analysis in Stata Jeff Pitblado Associate Director, Statistical Software StataCorp LP 2009 Canadian Stata Users Group Meeting Outline 1 Types of data 2 2 Survey data characteristics 4 2.1 Single

### Forecasting in STATA: Tools and Tricks

Forecasting in STATA: Tools and Tricks Introduction This manual is intended to be a reference guide for time series forecasting in STATA. It will be updated periodically during the semester, and will be

### Using the Delta Method to Construct Confidence Intervals for Predicted Probabilities, Rates, and Discrete Changes

Using the Delta Method to Construct Confidence Intervals for Predicted Probabilities, Rates, Discrete Changes JunXuJ.ScottLong Indiana University August 22, 2005 The paper provides technical details on

### SAS Software to Fit the Generalized Linear Model

SAS Software to Fit the Generalized Linear Model Gordon Johnston, SAS Institute Inc., Cary, NC Abstract In recent years, the class of generalized linear models has gained popularity as a statistical modeling

### Panel Data Analysis Josef Brüderl, University of Mannheim, March 2005

Panel Data Analysis Josef Brüderl, University of Mannheim, March 2005 This is an introduction to panel data analysis on an applied level using Stata. The focus will be on showing the "mechanics" of these

### 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

### Part 2: Analysis of Relationship Between Two Variables

Part 2: Analysis of Relationship Between Two Variables Linear Regression Linear correlation Significance Tests Multiple regression Linear Regression Y = a X + b Dependent Variable Independent Variable

### Regression Analysis: A Complete Example

Regression Analysis: A Complete Example This section works out an example that includes all the topics we have discussed so far in this chapter. A complete example of regression analysis. PhotoDisc, Inc./Getty

### Syntax Menu Description Options Remarks and examples Stored results References Also see

Title stata.com xi Interaction expansion Syntax Syntax Menu Description Options Remarks and examples Stored results References Also see xi [, prefix(string) noomit ] term(s) xi [, prefix(string) noomit

: Table of Contents... 1 Overview of Model... 1 Dispersion... 2 Parameterization... 3 Sigma-Restricted Model... 3 Overparameterized Model... 4 Reference Coding... 4 Model Summary (Summary Tab)... 5 Summary

### Multinomial and Ordinal Logistic Regression

Multinomial and Ordinal Logistic Regression ME104: Linear Regression Analysis Kenneth Benoit August 22, 2012 Regression with categorical dependent variables When the dependent variable is categorical,

### INDIRECT INFERENCE (prepared for: The New Palgrave Dictionary of Economics, Second Edition)

INDIRECT INFERENCE (prepared for: The New Palgrave Dictionary of Economics, Second Edition) Abstract Indirect inference is a simulation-based method for estimating the parameters of economic models. Its

### Econometric Methods for Panel Data

Based on the books by Baltagi: Econometric Analysis of Panel Data and by Hsiao: Analysis of Panel Data Robert M. Kunst robert.kunst@univie.ac.at University of Vienna and Institute for Advanced Studies

### Multivariate Logistic Regression

1 Multivariate Logistic Regression As in univariate logistic regression, let π(x) represent the probability of an event that depends on p covariates or independent variables. Then, using an inv.logit formulation

### Outline. Topic 4 - Analysis of Variance Approach to Regression. Partitioning Sums of Squares. Total Sum of Squares. Partitioning sums of squares

Topic 4 - Analysis of Variance Approach to Regression Outline Partitioning sums of squares Degrees of freedom Expected mean squares General linear test - Fall 2013 R 2 and the coefficient of correlation

### Correlation and Simple Linear Regression

Correlation and Simple Linear Regression We are often interested in studying the relationship among variables to determine whether they are associated with one another. When we think that changes in a

### From this it is not clear what sort of variable that insure is so list the first 10 observations.

MNL in Stata We have data on the type of health insurance available to 616 psychologically depressed subjects in the United States (Tarlov et al. 1989, JAMA; Wells et al. 1989, JAMA). The insurance is

Lecture 5: Linear least-squares Regression III: Advanced Methods William G. Jacoby Department of Political Science Michigan State University http://polisci.msu.edu/jacoby/icpsr/regress3 Simple Linear Regression

### Chapter 3: The Multiple Linear Regression Model

Chapter 3: The Multiple Linear Regression Model Advanced Econometrics - HEC Lausanne Christophe Hurlin University of Orléans November 23, 2013 Christophe Hurlin (University of Orléans) Advanced Econometrics

### Unit 12 Logistic Regression Supplementary Chapter 14 in IPS On CD (Chap 16, 5th ed.)

Unit 12 Logistic Regression Supplementary Chapter 14 in IPS On CD (Chap 16, 5th ed.) Logistic regression generalizes methods for 2-way tables Adds capability studying several predictors, but Limited to

### Regression. Name: Class: Date: Multiple Choice Identify the choice that best completes the statement or answers the question.

Class: Date: Regression Multiple Choice Identify the choice that best completes the statement or answers the question. 1. Given the least squares regression line y8 = 5 2x: a. the relationship between

### For more information on the Stata Journal, including information for authors, see the web page. http://www.stata-journal.com

The Stata Journal Editor H. Joseph Newton Department of Statistics Texas A & M University College Station, Texas 77843 979-845-3142; FAX 979-845-3144 jnewton@stata-journal.com Associate Editors Christopher

### Failure to take the sampling scheme into account can lead to inaccurate point estimates and/or flawed estimates of the standard errors.

Analyzing Complex Survey Data: Some key issues to be aware of Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised January 24, 2015 Rather than repeat material that is

### gllamm companion for Contents

gllamm companion for Rabe-Hesketh, S. and Skrondal, A. (2012). Multilevel and Longitudinal Modeling Using Stata (3rd Edition). Volume I: Continuous Responses. College Station, TX: Stata Press. Contents

### 2. Linear regression with multiple regressors

2. Linear regression with multiple regressors Aim of this section: Introduction of the multiple regression model OLS estimation in multiple regression Measures-of-fit in multiple regression Assumptions

### Lecture 2: Simple Linear Regression

DMBA: Statistics Lecture 2: Simple Linear Regression Least Squares, SLR properties, Inference, and Forecasting Carlos Carvalho The University of Texas McCombs School of Business mccombs.utexas.edu/faculty/carlos.carvalho/teaching

### Example: Boats and Manatees

Figure 9-6 Example: Boats and Manatees Slide 1 Given the sample data in Table 9-1, find the value of the linear correlation coefficient r, then refer to Table A-6 to determine whether there is a significant

### Regression Analysis Prof. Soumen Maity Department of Mathematics Indian Institute of Technology, Kharagpur. Lecture - 2 Simple Linear Regression

Regression Analysis Prof. Soumen Maity Department of Mathematics Indian Institute of Technology, Kharagpur Lecture - 2 Simple Linear Regression Hi, this is my second lecture in module one and on simple

### Title. Syntax. Menu. Description. stata.com. lrtest Likelihood-ratio test after estimation. modelspec2. lrtest modelspec 1.

Title stata.com lrtest Likelihood-ratio test after estimation Syntax Menu Description Options Remarks and examples Stored results Methods and formulas References Also see Syntax lrtest modelspec 1 [ modelspec2

### Chapter 10: Basic Linear Unobserved Effects Panel Data. Models:

Chapter 10: Basic Linear Unobserved Effects Panel Data Models: Microeconomic Econometrics I Spring 2010 10.1 Motivation: The Omitted Variables Problem We are interested in the partial effects of the observable

### 7 Hypothesis testing - one sample tests

7 Hypothesis testing - one sample tests 7.1 Introduction Definition 7.1 A hypothesis is a statement about a population parameter. Example A hypothesis might be that the mean age of students taking MAS113X

### Quick Stata Guide by Liz Foster

by Liz Foster Table of Contents Part 1: 1 describe 1 generate 1 regress 3 scatter 4 sort 5 summarize 5 table 6 tabulate 8 test 10 ttest 11 Part 2: Prefixes and Notes 14 by var: 14 capture 14 use of the

### Statistics 104: Section 6!

Page 1 Statistics 104: Section 6! TF: Deirdre (say: Dear-dra) Bloome Email: dbloome@fas.harvard.edu Section Times Thursday 2pm-3pm in SC 109, Thursday 5pm-6pm in SC 705 Office Hours: Thursday 6pm-7pm SC

### 11. Analysis of Case-control Studies Logistic Regression

Research methods II 113 11. Analysis of Case-control Studies Logistic Regression This chapter builds upon and further develops the concepts and strategies described in Ch.6 of Mother and Child Health:

### Variance of OLS Estimators and Hypothesis Testing. Randomness in the model. GM assumptions. Notes. Notes. Notes. Charlie Gibbons ARE 212.

Variance of OLS Estimators and Hypothesis Testing Charlie Gibbons ARE 212 Spring 2011 Randomness in the model Considering the model what is random? Y = X β + ɛ, β is a parameter and not random, X may be

### SAS R IML (Introduction at the Master s Level)

SAS R IML (Introduction at the Master s Level) Anton Bekkerman, Ph.D., Montana State University, Bozeman, MT ABSTRACT Most graduate-level statistics and econometrics programs require a more advanced knowledge

### xtmixed & denominator degrees of freedom: myth or magic

xtmixed & denominator degrees of freedom: myth or magic 2011 Chicago Stata Conference Phil Ender UCLA Statistical Consulting Group July 2011 Phil Ender xtmixed & denominator degrees of freedom: myth or

### Statistical Rules of Thumb

Statistical Rules of Thumb Second Edition Gerald van Belle University of Washington Department of Biostatistics and Department of Environmental and Occupational Health Sciences Seattle, WA WILEY AJOHN

### MISSING DATA TECHNIQUES WITH SAS. IDRE Statistical Consulting Group

MISSING DATA TECHNIQUES WITH SAS IDRE Statistical Consulting Group ROAD MAP FOR TODAY To discuss: 1. Commonly used techniques for handling missing data, focusing on multiple imputation 2. Issues that could

### Econometrics Simple Linear Regression

Econometrics Simple Linear Regression Burcu Eke UC3M Linear equations with one variable Recall what a linear equation is: y = b 0 + b 1 x is a linear equation with one variable, or equivalently, a straight

### GETTING STARTED: STATA & R BASIC COMMANDS ECONOMETRICS II. Stata Output Regression of wages on education

GETTING STARTED: STATA & R BASIC COMMANDS ECONOMETRICS II Stata Output Regression of wages on education. sum wage educ Variable Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------

### SPSS Guide: Regression Analysis

SPSS Guide: Regression Analysis I put this together to give you a step-by-step guide for replicating what we did in the computer lab. It should help you run the tests we covered. The best way to get familiar

### 5. Linear Regression

5. Linear Regression Outline.................................................................... 2 Simple linear regression 3 Linear model............................................................. 4

### Module 14: Missing Data Stata Practical

Module 14: Missing Data Stata Practical Jonathan Bartlett & James Carpenter London School of Hygiene & Tropical Medicine www.missingdata.org.uk Supported by ESRC grant RES 189-25-0103 and MRC grant G0900724