Non Linear Functions in Panel Data Models Algorithm

  • Slides: 17
Download presentation
Non Linear Functions in Panel Data Models Algorithm Using Stata Presentation at the Stata

Non Linear Functions in Panel Data Models Algorithm Using Stata Presentation at the Stata User Group Meeting in Berlin 8. April 2005 Fred Ramb and Markus Reitzig

Overview • Theoretical models often are nonlinear e. g. in economics the well known

Overview • Theoretical models often are nonlinear e. g. in economics the well known q-model • Micro panel data • NLLS estimator is biased • Fixed effects estimator is efficient • Standard software package is not available Ramb&Reitzig – Non Linear Functions in Panel Data Models

Overview • Motivation • Theory • q Model • Linearized Fixed Effects Estimator •

Overview • Motivation • Theory • q Model • Linearized Fixed Effects Estimator • Stata Code • Pooled Cross Sectional Nonlinear Least Squares • Panel Data Random Effects and Fixed Effects • Empirical Results • Summary Ramb&Reitzig – Non Linear Functions in Panel Data Models

Theory (I): q Model Cobb-Douglas Production function Logarithmic transformation With for small x: Ramb&Reitzig

Theory (I): q Model Cobb-Douglas Production function Logarithmic transformation With for small x: Ramb&Reitzig – Non Linear Functions in Panel Data Models

Theory (II): Algorithm Logarithmic transformation With for larger x, linearized version is estimated: with:

Theory (II): Algorithm Logarithmic transformation With for larger x, linearized version is estimated: with: Ramb&Reitzig – Non Linear Functions in Panel Data Models

Stata Code: NLLS • program nlacc • if "`1'" =="? " { • global

Stata Code: NLLS • program nlacc • if "`1'" =="? " { • global S_1 "B_0 X 1 C 2 C 3 T 1 T 2 T 3 T 4 T 5" • global B_0= 0 • global X 1= 0 • global C 2= 0 • global C 3= 0 • global T 1= 0 • global T 2= 0 • global T 3= 0 • global T 4= 0 • global T 5= 0 • exit • } • replace `1'=$B_0 + ln(1+($X 1*x 2)) + $C 1*control 1+$C 2*control 2 + $C 3*control 3 /* • */ + $T 1*dyear 1 + $T 3*dyear 2 + $T 3*dyear 3 + $T 4*dyear 4 + $T 5*dyear 5 • end • nl acc y Ramb&Reitzig – Non Linear Functions in Panel Data Models

Stata Code: Fixed Effects • xtreg y x control 1 control 2 time*, fe

Stata Code: Fixed Effects • xtreg y x control 1 control 2 time*, fe • gen ex = _b[x] • gen y_s = y - (log(1+ex*x)) • gen x_s = x / (1+ (ex*x)) • log off • local i=1 • while `i' < 50 { • quietly xtreg y_s x_s control 1 control 2 time*, fe • quietly replace ex = ex + _b[x_s] • quietly replace y_s = y - (log(1+ex*x)) • quietly replace x_s = x 2 / (1+ (ex*x)) • local i = `i' + 1 • } • log on • replace y_s = y - (log(1+ex*x)) + (ex*(x / (1+ (ex*x)))) • xtreg y_s x_s control 1 control 2 time*, fe Ramb&Reitzig – Non Linear Functions in Panel Data Models

Stata Code: Random Effects • xtreg y x control 1 control 2 time*, re

Stata Code: Random Effects • xtreg y x control 1 control 2 time*, re • gen exr = _b[x] • gen y_sr = y - (log(1+exr*x)) • gen x_sr = x / (1+ (exr*x) • log off • local i=1 • while `i' < 50 { • quietly replace exr = exr + _b[x_sr] • quietly replace y_sr = y-(log(1+exr*x)) • quietly replace x_sr = x / (1+ (exr*x)) • quietly xtreg y_sr x_sr control 1 control 2 time*, re • local i = `i' + 1 • } • log on • replace y_sr = y-(log(1+exr*x)) + (exr*(x / (1+ (exr*x)))) • xtreg y_sr x_sr control 1 control 2 time*, re • xttest 0 Ramb&Reitzig – Non Linear Functions in Panel Data Models

Stata Code: Hausman Test • xtreg y_s x_s control 1 control 2 time*, fe

Stata Code: Hausman Test • xtreg y_s x_s control 1 control 2 time*, fe • est store fixed • xtreg y_sr x_sr control 1 control 2 time*, re • hausman fixed Ramb&Reitzig – Non Linear Functions in Panel Data Models

Empirical Results: Dataset • Sources • Hoppenstedt: accounting data • Datastream: stock market data

Empirical Results: Dataset • Sources • Hoppenstedt: accounting data • Datastream: stock market data • Sample • 1997 -2003 • Consolidated financial statements • Manufacturing sector • Estimation Sample • 2, 786 observations / 676 firms (Overall) • 1, 463 observations / 325 firms (HGB) • 532 observations / 139 firms (IAS) • 791 observations / 212 firms ( US-GAAP) Ramb&Reitzig – Non Linear Functions in Panel Data Models

Empirical Results: Example 1 Ramb&Reitzig – Non Linear Functions in Panel Data Models

Empirical Results: Example 1 Ramb&Reitzig – Non Linear Functions in Panel Data Models

Empirical Results: Example 2 Ramb&Reitzig – Non Linear Functions in Panel Data Models

Empirical Results: Example 2 Ramb&Reitzig – Non Linear Functions in Panel Data Models

Summary • Pros • Different results by estimating pooled cross sectional nonlinear least squares

Summary • Pros • Different results by estimating pooled cross sectional nonlinear least squares on the one hand by estimating fixed effects using the algorithm on the other hand. • Results using the algorithm are more efficient • Cons • Do-File is limited to the q-model • Heteroskedasticity? Robust estimation is necessary • Local or global maximum? Bootstrap is necessary • Dynamics? GMM is necessary Ramb&Reitzig – Non Linear Functions in Panel Data Models

Thank you for your attention Ramb&Reitzig – Non Linear Functions in Panel Data Models

Thank you for your attention Ramb&Reitzig – Non Linear Functions in Panel Data Models

Appendix (I) Ramb&Reitzig – Non Linear Functions in Panel Data Models

Appendix (I) Ramb&Reitzig – Non Linear Functions in Panel Data Models

Ramb&Reitzig – Non Linear Functions in Panel Data Models

Ramb&Reitzig – Non Linear Functions in Panel Data Models

Appendix (III) Ramb&Reitzig – Non Linear Functions in Panel Data Models

Appendix (III) Ramb&Reitzig – Non Linear Functions in Panel Data Models