William Greene Department of Economics Stern School of Business Topics in MicroeconometricsUniversity of QueenslandBrisbane, QLDJuly 7-9, 2010
2sls Load Cornwell and Rupert Data with OPEN:Project
Telling NLOGIT You are Fitting a Panel Data Model Balanced Panel Model ; … ; PDS = number of periods $ REGRESS ; Lhs = Milk ; Rhs = One,Labor ; Pds = 6 ; Panel $ (Note ;Panel is needed only for REGRESS) Unbalanced Panel Model ; … ; PDS = group size variable $ REGRESS ; Lhs = Milk ; Rhs = One,Labor ; Pds = FarmPrds ; Panel $ FarmPrds gives the number of periods, in every period. (More later about unbalanced panels)
Creating a Group Size Variable Requires an ID variable (such as FARM) (1) Set the full sample exactly as desired (2) REGRESS ; LHS=One ; Rhs = One ; Panel ; STR = ID $ where ID is the identification variable $ This creates a new variable named _GROUPTI
Application to Spanish Dairy Farms Dairy.lpj N = 247 farms, T = 6 years (1993-1998)
A Panel Data Regression Regress ; LHS = YIT ; RHS = One,X1,X2,X3,X4 ; PDS = 6 ; PANEL $ (;PANEL is needed only for the linear regression model.)
Global Setting for Panels SETPANEL ; Group = the name of the ID variable ; PDS = the name of the groupsize variable to create $ Subsequent model commands state ;PANEL with no other specifications requred to set the panel. Some other specifications usually required for the specific model – e.g., fixed vs. random effects.