* * Example 7.2 from pp 118-120 * * This is a panel data set. The statistical properties of this are covered in * chapter 13 of the text. We're not doing anything particularly fancy here, and * you could just read this as 90 observations with no calendar scheme. * open data tablef7-1[1].txt * * The PANELOBS option on CALENDAR tells how many observations there are per * individual. * calendar(panelobs=15) * * 6//15 means 6 individuals, 15 observations for each. * data(format=prn,org=columns) 1//1 6//15 id time c q pf lf * * Create the required transformations * set logc = log(c) set logq = log(q) set logqsq = logq**2 set logpf = log(pf) * * Create dummies for 5 individuals and 14 time periods * dec vect[series] idummies(5) dec vect[series] tdummies(14) * do i=1,5 set idummies(i) = id==i end do i do i=1,14 set tdummies(i) = time==i end do i * linreg logc # constant logq logqsq logpf lf idummies tdummies * * Pull the coefficients on the time dummies out of the %beta vector * set tcoeffs 1 14 = %beta(t+10) set timeper 1 14 = t * * Graph them * scatter(style=dots,footer="Figure 7.1 Estimated Year Dummy Variable Coefficients",$ vlabel="B(Year)",hlabel="Year") # timeper tcoeffs * * Do exclusion tests on the dummies * exclude # idummies exclude # tdummies exclude # tdummies idummies