Module 4 Bivariate Regressions

Similar documents
[BINARY DEPENDENT VARIABLE ESTIMATION WITH STATA]

Logistic Regression Analysis

Final Exam - section 1. Thursday, December hours, 30 minutes

tm / / / / / / / / / / / / Statistics/Data Analysis User: Klick Project: Limited Dependent Variables{space -6}

sociology SO5032 Quantitative Research Methods Brendan Halpin, Sociology, University of Limerick Spring 2018 SO5032 Quantitative Research Methods

Maximum Likelihood Estimation Richard Williams, University of Notre Dame, Last revised January 10, 2017

Getting Started in Logit and Ordered Logit Regression (ver. 3.1 beta)

Getting Started in Logit and Ordered Logit Regression (ver. 3.1 beta)

Table 4. Probit model of union membership. Probit coefficients are presented below. Data from March 2008 Current Population Survey.

Maximum Likelihood Estimation Richard Williams, University of Notre Dame, Last revised January 13, 2018

STATA log file for Time-Varying Covariates (TVC) Duration Model Estimations.

Module 9: Single-level and Multilevel Models for Ordinal Responses. Stata Practical 1

Morten Frydenberg Wednesday, 12 May 2004

Categorical Outcomes. Statistical Modelling in Stata: Categorical Outcomes. R by C Table: Example. Nominal Outcomes. Mark Lunt.

WWS 508b Precept 10. John Palmer. April 27, 2010

Sociology 704: Topics in Multivariate Statistics Instructor: Natasha Sarkisian. Binary Logit

EC327: Limited Dependent Variables and Sample Selection Binomial probit: probit

West Coast Stata Users Group Meeting, October 25, 2007

South African Dataset for MAMS

Introduction to fractional outcome regression models using the fracreg and betareg commands

Sociology Exam 3 Answer Key - DRAFT May 8, 2007

Nonlinear Econometric Analysis (ECO 722) Answers to Homework 4

Review questions for Multinomial Logit/Probit, Tobit, Heckit, Quantile Regressions

Model fit assessment via marginal model plots

3. Multinomial response models

Multinomial Logit Models - Overview Richard Williams, University of Notre Dame, Last revised February 13, 2017

Sean Howard Econometrics Final Project Paper. An Analysis of the Determinants and Factors of Physical Education Attendance in the Fourth Quarter

Limited Dependent Variables

Cameron ECON 132 (Health Economics): FIRST MIDTERM EXAM (A) Fall 17

Quantitative Techniques Term 2

STATA Program for OLS cps87_or.do

Why do the youth in Jamaica neither study nor work? Evidence from JSLC 2001

Allison notes there are two conditions for using fixed effects methods.

Catherine De Vries, Spyros Kosmidis & Andreas Murr

Econometric Methods for Valuation Analysis

COMPLEMENTARITY ANALYSIS IN MULTINOMIAL

Longitudinal Logistic Regression: Breastfeeding of Nepalese Children

Estimating Ordered Categorical Variables Using Panel Data: A Generalised Ordered Probit Model with an Autofit Procedure

Advanced Econometrics

u panel_lecture . sum

WP 3 - Innovation and Access to Finance Project Steering Meeting and Stakeholders Meeting September 2016

Description Remarks and examples References Also see

*1A. Basic Descriptive Statistics sum housereg drive elecbill affidavit witness adddoc income male age literacy educ occup cityyears if control==1

İnsan TUNALI 8 November 2018 Econ 511: Econometrics I. ASSIGNMENT 7 STATA Supplement

DETERMINANTS OF AGRO-DEALERS PARTICIPATION IN THE LOAN MARKET IN NIGERIA By Prof. Aderibigbe S. Olomola Senior Economist/Consultant IFPRI-NIGERIA

Day 3C Simulation: Maximum Simulated Likelihood

Poverty Assessment Tool Accuracy Submission: Addendum for New Poverty Lines USAID/IRIS Tool for Albania Submitted: September 14, 2011

Calculating the Probabilities of Member Engagement

Professor Brad Jones University of Arizona POL 681, SPRING 2004 INTERACTIONS and STATA: Companion To Lecture Notes on Statistical Interactions

ECON Introductory Econometrics. Seminar 4. Stock and Watson Chapter 8

Appendix. Table A.1 (Part A) The Author(s) 2015 G. Chakrabarti and C. Sen, Green Investing, SpringerBriefs in Finance, DOI /

This notes lists some statistical estimates on which the analysis and discussion in the Health Affairs article was based.

ECON Introductory Econometrics Seminar 2, 2015

1) The Effect of Recent Tax Changes on Taxable Income

Assignment #5 Solutions: Chapter 14 Q1.

The data definition file provided by the authors is reproduced below: Obs: 1500 home sales in Stockton, CA from Oct 1, 1996 to Nov 30, 1998

Example 2.3: CEO Salary and Return on Equity. Salary for ROE = 0. Salary for ROE = 30. Example 2.4: Wage and Education

An Introduction to Event History Analysis

Modeling wages of females in the UK

Poverty Assessment Tool Accuracy Submission: Addendum for New Poverty Lines USAID/IRIS Tool for East Timor Submitted: September 14, 2011

Econ 371 Problem Set #4 Answer Sheet. 6.2 This question asks you to use the results from column (1) in the table on page 213.

Technical Documentation for Household Demographics Projection

Lecture 10: Alternatives to OLS with limited dependent variables, part 1. PEA vs APE Logit/Probit

Joint Center for Housing Studies. Harvard University

Religion and Volunteerism

Duration Models: Parametric Models

Labor Force Participation and the Wage Gap Detailed Notes and Code Econometrics 113 Spring 2014

Your Name (Please print) Did you agree to take the optional portion of the final exam Yes No. Directions

SHARE and SHARELIFE The collection of longitudinal data on older adults in Europe

The Predictive Power of Financial Blogs

gologit2 documentation Richard Williams, Department of Sociology, University of Notre Dame Last revised February 1, 2007

Advanced Industrial Organization I Identi cation of Demand Functions

Assesing the Impact of Public Research Funding on Scientific Production the Case Study from Slovakia

WesVar uses repeated replication variance estimation methods exclusively and as a result does not offer the Taylor Series Linearization approach.

Cross-country comparison using the ECHP Descriptive statistics and Simple Models. Cheti Nicoletti Institute for Social and Economic Research

List of figures. I General information 1

Estimating treatment effects for ordered outcomes using maximum simulated likelihood

Two-stage least squares examples. Angrist: Vietnam Draft Lottery Men, Cohorts. Vietnam era service

You created this PDF from an application that is not licensed to print to novapdf printer (

Poverty Alleviation in Burkina Faso: An Analytical Approach

Market Variables and Financial Distress. Giovanni Fernandez Stetson University

Size mobility and determinants of survival: An analysis of the major 250 industrial enterprises of Turkey,

. ********** OUTPUT FILE: CARD & KRUEGER (1994)***********.. * STATA 10.0 CODE. * copyright C 2008 by Tito Boeri & Jan van Ours. * "THE ECONOMICS OF

Analyzing the Determinants of Project Success: A Probit Regression Approach

Simulated Multivariate Random Effects Probit Models for Unbalanced Panels

Problem Set 6 ANSWERS

Rescaling results of nonlinear probability models to compare regression coefficients or variance components across hierarchically nested models

Demand for Health Insurance in Ghana: What Factors Influence Enrollment?

Supporting Information: Preferences for International Redistribution: The Divide over the Eurozone Bailouts

Chapter 6 Part 3 October 21, Bootstrapping

Abadie s Semiparametric Difference-in-Difference Estimator

Handout seminar 6, ECON4150

Poverty Assessment Tool Accuracy Submission: Addendum for New Poverty Lines USAID/IRIS Tool for Uganda Submitted: June 28, 2010

1. Overall approach to the tool development

Description Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas References Also see

Australian School of Business Working Paper

Time series data: Part 2

CHAPTER 11 Regression with a Binary Dependent Variable. Kazu Matsuda IBEC PHBU 430 Econometrics

CHAPTER 4 ESTIMATES OF RETIREMENT, SOCIAL SECURITY BENEFIT TAKE-UP, AND EARNINGS AFTER AGE 50

ADOPTION OF PURDUE IMPROVED COWPEA STORAGE (PICS) BAG IN NORTHERN NIGERIA

Transcription:

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

Module 4 Bivariate Regressions This module will introduce the commands required to run bivariate regressions, with particular emphasis on probit and logit Since these are non-linear models, it is important to calculate the marginal effects adequately, which we will do through the mfx command We will end the module will an illustration of how to export the results with outreg For this module we will use hhmembers_2dta, available in the AGRODEP website 1 probit The probit command will run a probit regression The syntax is similar to regress First you type the command name, then the left-hand-side variable followed by the right-hand-side variables You may use if, in to constrain the estimation to a subset of the sample, as well as weights and other advanced options that will not be covered here * Do-file or Command Window help probit *Help File probit depvar [indepvars] [if] [in] [weight] [, options] probit family_work sex age *Stata output Iteration 0: log likelihood = -11473134 Iteration 1: log likelihood = -10810857 Iteration 2: log likelihood = -10805545 Iteration 3: log likelihood = -10805544 Iteration 4: log likelihood = -10805544 Probit regression Number of obs = 23127 LR chi2(2) = 133518 Prob > chi2 = 00000 Log likelihood = -10805544 Pseudo R2 = 00582 family_work Coef Std Err z P> z [95% Conf Interval] -------------+-------------- sex 3913636 0196327 1993 0000 3528842 4298431 age 104986 0035399 2966 0000 0980479 1119241 _cons -2078091 0378471-5491 0000-215227 -2003913 1

To calculate the marginal effects from your probit regression, type mfx immediately after you ran the probit regression The mfx command uses the stored output that Stata saves in its temporary memory (for more information on how Stata saves the results in memory and how to access them, type help return ) If you are familiar with probit regressions you will know that the marginal effects are not constant Stata calculates the marginal effects at the average values of the explanatory variables You may change this with the at() option This is an advanced feature (see help mfx for details, especially the at(atlist) section) mfx *Stata Output Marginal effects after probit y = Pr(family_work) (predict) = 17270865 variable dy/dx Std Err z P> z [ 95% CI ] X ---------+------------------ sex* 1046784 00502 2084 0000 094835 114522 511213 age 0294173 00091 3229 0000 027632 031203 927055 (*) dy/dx is for discrete change of dummy variable from 0 to 1 2 Logit To run a logit regression, use the logit command The syntax is similar to that of regress and probit First you type the command name, then the left-hand-side variable followed by the right-hand-side variables Again, you may use if, in, and weights, and some advanced options that will not be covered in these notes * Do-file or Command Window help logit *Help File logit depvar [indepvars] [if] [in] [weight] [, options] logit family_work sex age 2

*Stata output Iteration 0: log likelihood = -11132912 Iteration 1: log likelihood = -10420177 Iteration 2: log likelihood = -10392673 Iteration 3: log likelihood = -10392608 Iteration 4: log likelihood = -10392608 Logistic regression Number of obs = 22920 LR chi2(2) = 148061 Prob > chi2 = 00000 Log likelihood = -10392608 Pseudo R2 = 00665 family_work Coef Std Err z P> z [95% Conf Interval] -------------+-------------- sex 7369376 0359242 2051 0000 6665274 8073478 age 2004067 0064456 3109 0000 1877736 2130399 _cons -3823348 0721334-5300 0000-3964727 -3681969 end of do-file As in the case of probit, you may use the mfx to obtain the marginal effects mfx *Stata output Marginal effects after logit y = Pr(family_work) (predict) = 1695619 variable dy/dx Std Err z P> z [ 95% CI ] X ---------+------------------ sex* 1035623 00494 2097 0000 093883 113242 511213 age 0282194 00086 3272 0000 026529 02991 927055 (*) dy/dx is for discrete change of dummy variable from 0 to 1 3

To check the accuracy in the predictive power of your model, type: estat classification estat classification *Stata output Logistic model for family_work -------- True -------- Classified D ~D Total -----------+--------------------------+----------- + 0 0 0-4347 18573 22920 -----------+--------------------------+----------- Total 4347 18573 22920 Classified + if predicted Pr(D) >= 5 True D defined as family_work!= 0 Sensitivity Pr( + D) 000% Specificity Pr( - ~D) 10000% Positive predictive value Pr( D +) % Negative predictive value Pr(~D -) 8103% False + rate for true ~D Pr( + ~D) 000% False - rate for true D Pr( - D) 10000% False + rate for classified + Pr(~D +) % False - rate for classified - Pr( D -) 1897% Correctly classified 8103% 3 outreg To store your results in a Word file use outreg as in the previous module probit family_work sex age margeff,replace outreg using reg_module4,replace se ctitle("probit") title("family work") logit family_work sex age margeff,replace outreg using reg_module4,append se ctitle("logit") 4

Your Word file will look like this: Bivariate Regressions (1) (2) Probit Logit Sex 0076 0077 (0004)** (0004)** Age 0021 0021 (0000)** (0000)** Observations 22920 22920 Standard errors in parentheses * significant at 5%; ** significant at 1% 4 Wrapping Up This module presented probit and logit, the two most commonly used commands for bivariate regressions We introduced the mfx command to calculate the marginal effects, and we finished the module showing how to export the estimation results with outreg 5