5. The Fixed Time Effect Model
5.1 Least Squares Dummy Variable Models
Time02: cost = 20.578 + .868*output - .484*fuel -1.954*load
Time03: cost = 20.656 + .868*output - .484*fuel -1.954*load
Time04: cost = 20.741 + .868*output - .484*fuel -1.954*load
Time05: cost = 21.200 + .868*output - .484*fuel -1.954*load
Time06: cost = 21.412 + .868*output - .484*fuel -1.954*load
Time07: cost = 21.503 + .868*output - .484*fuel -1.954*load
Time08: cost = 21.654 + .868*output - .484*fuel -1.954*load
Time09: cost = 21.830 + .868*output - .484*fuel -1.954*load
Time10: cost = 22.114 + .868*output - .484*fuel -1.954*load
Time11: cost = 22.465 + .868*output - .484*fuel -1.954*load
Time12: cost = 22.651 + .868*output - .484*fuel -1.954*load
Time13: cost = 22.617 + .868*output - .484*fuel -1.954*load
Time14: cost = 22.552 + .868*output - .484*fuel -1.954*load
Time15: cost = 22.537 + .868*output - .484*fuel -1.954*load
PROC REG DATA=masil.airline;
MODEL cost = t1-t14 output fuel load;
RUN;
Model: MODEL1
Dependent Variable: cost
Number of Observations Read 90
Number of Observations Used 90
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 17 112.95270 6.64428 439.62 <.0001
Error 72 1.08819 0.01511
Corrected Total 89 114.04089
Root MSE 0.12294 R-Square 0.9905
Dependent Mean 13.36561 Adj R-Sq 0.9882
Coeff Var 0.91981
Parameter Estimates
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
Intercept 1 22.53677 4.94053 4.56 <.0001
t1 1 -2.04096 0.73469 -2.78 0.0070
t2 1 -1.95873 0.72275 -2.71 0.0084
t3 1 -1.88103 0.72036 -2.61 0.0110
t4 1 -1.79601 0.69882 -2.57 0.0122
t5 1 -1.33693 0.50604 -2.64 0.0101
t6 1 -1.12514 0.40862 -2.75 0.0075
t7 1 -1.03341 0.37642 -2.75 0.0076
t8 1 -0.88274 0.32601 -2.71 0.0085
t9 1 -0.70719 0.29470 -2.40 0.0190
t10 1 -0.42296 0.16679 -2.54 0.0134
t11 1 -0.07144 0.07176 -1.00 0.3228
t12 1 0.11457 0.09841 1.16 0.2482
t13 1 0.07979 0.08442 0.95 0.3477
t14 1 0.01546 0.07264 0.21 0.8320
output 1 0.86773 0.01541 56.32 <.0001
fuel 1 -0.48448 0.36411 -1.33 0.1875
load 1 -1.95440 0.44238 -4.42 <.0001
. regress cost t1-t14 output fuel load
REGRESS;Lhs=COST;Rhs=ONE,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,
OUTPUT,FUEL,LOAD$
5.1.2 LSDV2 without the Intercept
--> REGRESS;Lhs=COST;Rhs=T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,
T15,OUTPUT,FUEL,LOAD$
| Ordinary least squares regression Weighting variable = none |
| Dep. var. = COST Mean= 13.36560929 , S.D.= 1.131971002 |
| Model size: Observations = 90, Parameters = 18, Deg.Fr.= 72 |
| Residuals: Sum of squares= 1.088190223 , Std.Dev.= .12294 |
| Fit: R-squared= .990458, Adjusted R-squared = .98820 |
| Model test: F[ 17, 72] = 439.62, Prob value = .00000 |
| Diagnostic: Log-L = 70.9837, Restricted(b=0) Log-L = -138.3581 |
| LogAmemiyaPrCrt.= -4.010, Akaike Info. Crt.= -1.177 |
| Model does not contain ONE. R-squared and F can be negative! |
| Autocorrel: Durbin-Watson Statistic = 2.93900, Rho = -.46950 |
+-----------------------------------------------------------------------+
+---------+--------------+----------------+--------+---------+----------+
|Variable | Coefficient | Standard Error |t-ratio |P[|T|>t] | Mean of X|
+---------+--------------+----------------+--------+---------+----------+
T1 20.49580478 4.2095283 4.869 .0000 .66666667E-01
T2 20.57803885 4.2215262 4.875 .0000 .66666667E-01
T3 20.65573100 4.2241771 4.890 .0000 .66666667E-01
T4 20.74075857 4.2457497 4.885 .0000 .66666667E-01
T5 21.19983202 4.4403312 4.774 .0000 .66666667E-01
T6 21.41162082 4.5386212 4.718 .0000 .66666667E-01
T7 21.50335085 4.5713968 4.704 .0000 .66666667E-01
T8 21.65402827 4.6228858 4.684 .0000 .66666667E-01
T9 21.82957108 4.6569062 4.688 .0000 .66666667E-01
T10 22.11380260 4.7926483 4.614 .0000 .66666667E-01
T11 22.46532734 4.9499089 4.539 .0000 .66666667E-01
T12 22.65133704 5.0085924 4.522 .0000 .66666667E-01
T13 22.61655508 4.9861391 4.536 .0000 .66666667E-01
T14 22.55222832 4.9559418 4.551 .0000 .66666667E-01
T15 22.53676562 4.9405321 4.562 .0000 .66666667E-01
OUTPUT .8677267843 .15408184E-01 56.316 .0000 -1.1743092
FUEL -.4844835367 .36410849 -1.331 .1875 12.770359
LOAD -1.954404328 .44237771 -4.418 .0000 .56046015
(Note: E+nn or E-nn means multiply by 10 to + or -nn power.)
PROC REG DATA=masil.airline;
MODEL cost = t1-t15 output fuel load /NOINT;
RUN;
. regress cost t1-t15 output fuel load, noc
5.1.3 LSDV3 with a Restriction
PROC REG DATA=masil.airline;
MODEL cost = t1-t15 output fuel load;
RESTRICT t1+t2+t3+t4+t5+t6+t7+t8+t9+t10+t11+t12+t13+t14+t15=0;
RUN;
Model: MODEL1
Dependent Variable: cost
NOTE: Restrictions have been applied to parameter estimates.
Number of Observations Read 90
Number of Observations Used 90
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 17 112.95270 6.64428 439.62 <.0001
Error 72 1.08819 0.01511
Corrected Total 89 114.04089
Root MSE 0.12294 R-Square 0.9905
Dependent Mean 13.36561 Adj R-Sq 0.9882
Coeff Var 0.91981
Parameter Estimates
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
Intercept 1 21.66698 4.62405 4.69 <.0001
t1 1 -1.17118 0.41783 -2.80 0.0065
t2 1 -1.08894 0.40586 -2.68 0.0090
t3 1 -1.01125 0.40323 -2.51 0.0144
t4 1 -0.92622 0.38177 -2.43 0.0178
t5 1 -0.46715 0.19076 -2.45 0.0168
t6 1 -0.25536 0.09856 -2.59 0.0116
t7 1 -0.16363 0.07190 -2.28 0.0258
t8 1 -0.01296 0.04862 -0.27 0.7907
t9 1 0.16259 0.06271 2.59 0.0115
t10 1 0.44682 0.17599 2.54 0.0133
t11 1 0.79834 0.32940 2.42 0.0179
t12 1 0.98435 0.38756 2.54 0.0132
t13 1 0.94957 0.36537 2.60 0.0113
t14 1 0.88524 0.33549 2.64 0.0102
t15 1 0.86978 0.32029 2.72 0.0083
output 1 0.86773 0.01541 56.32 <.0001
fuel 1 -0.48448 0.36411 -1.33 0.1875
load 1 -1.95440 0.44238 -4.42 <.0001
RESTRICT -1 -3.946E-15 . . .
* Probability computed using beta distribution.
. constraint define 3 t1+t2+t3+t4+t5+t6+t7+t8+t9+t10+t11+t12+t13+t14+t15=0
. cnsreg cost t1-t15 output fuel load, constraint(3)
F( 17, 72) = 439.62
Prob > F = 0.0000
Root MSE = .12294
( 1) t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10 + t11 + t12 + t13 + t14 + t15 = 0
------------------------------------------------------------------------------
cost | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
t1 | -1.171179 .4178338 -2.80 0.007 -2.004115 -.3382422
t2 | -1.088945 .4058579 -2.68 0.009 -1.898008 -.2798816
t3 | -1.011252 .4032308 -2.51 0.014 -1.815078 -.2074266
t4 | -.9262249 .3817675 -2.43 0.018 -1.687265 -.1651852
t5 | -.4671515 .1907596 -2.45 0.017 -.8474239 -.0868791
t6 | -.2553627 .0985615 -2.59 0.012 -.4518415 -.0588839
t7 | -.1636326 .0718969 -2.28 0.026 -.3069564 -.0203088
t8 | -.0129552 .0486249 -0.27 0.791 -.1098872 .0839768
t9 | .1625876 .0627099 2.59 0.012 .0375776 .2875976
t10 | .4468191 .175994 2.54 0.013 .0959814 .7976568
t11 | .7983439 .3294027 2.42 0.018 .1416916 1.454996
t12 | .9843536 .3875583 2.54 0.013 .2117702 1.756937
t13 | .9495716 .3653675 2.60 0.011 .2212248 1.677918
t14 | .8852448 .3354912 2.64 0.010 .2164554 1.554034
t15 | .8697821 .3202933 2.72 0.008 .2312891 1.508275
output | .8677268 .0154082 56.32 0.000 .8370111 .8984424
fuel | -.4844835 .3641085 -1.33 0.188 -1.210321 .2413535
load | -1.954404 .4423777 -4.42 0.000 -2.836268 -1.07254
_cons | 21.66698 4.624053 4.69 0.000 12.4491 30.88486
------------------------------------------------------------------------------
REGRESS;Lhs=COST;Rhs=ONE,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,
T15,OUTPUT,FUEL,LOAD;
Cls:b(1)+b(2)+b(3)+b(4)+b(5)+b(6)+b(7)+b(8)+b(9)+b(10)+b(11)+b(12)
+b(13)+b(14)+b(15)=0$
5.2.1 Estimating the Time Effect Model
. egen tm_cost = mean(cost), by(year) // compute time means
. egen tm_output = mean(output), by(year)
. egen tm_fuel = mean(fuel), by(year)
. egen tm_load = mean(load), by(year)
| year tm_cost tm_output tm_fuel tm_load |
|---------------------------------------------------|
| 1 12.36897 -1.790283 11.63606 .4788587 |
| 2 12.45963 -1.744389 11.66868 .4868322 |
| 3 12.60706 -1.577767 11.67494 .52358 |
| 4 12.77912 -1.443695 11.73193 .5244486 |
| 5 12.94143 -1.398122 12.26843 .5635266 |
| 6 13.0452 -1.393002 12.53826 .5541809 |
| 7 13.15965 -1.302416 12.62714 .5607425 |
| 8 13.29884 -1.222963 12.76768 .5670587 |
| 9 13.4651 -1.067003 12.86104 .6179098 |
| 10 13.70187 -.9023156 13.23183 .6233943 |
| 11 13.91324 -.9205539 13.66246 .5802577 |
| 12 14.05984 -.8641667 13.82315 .5856243 |
| 13 14.12841 -.7923916 13.75979 .5803183 |
| 14 14.23517 -.6428015 13.67403 .5804528 |
| 15 14.32062 -.5527684 13.62997 .5797168 |
+---------------------------------------------------+
. gen tw_cost = cost - tm_cost // transform variables
. gen tw_output = output - tm_output
. gen tw_fuel = fuel - tm_fuel
. gen tw_load = load - tm_load
. regress tw_cost tw_output tw_fuel tw_load, noc // within time effect
Source |
SS df
MS
Number of obs = 90
-------------+------------------------------
F( 3, 87) = 2015.95
Model | 75.6459391 3
25.215313 Prob >
F = 0.0000
Residual | 1.08819023 87
.012507934
R-squared = 0.9858
-------------+------------------------------
Adj R-squared = 0.9853
Total | 76.7341294 90
.852601437 Root
MSE = .11184
------------------------------------------------------------------------------
tw_cost | Coef. Std.
Err. t
P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
tw_output | .8677268 .0140171
61.90 0.000 .8398663
.8955873
tw_fuel | -.4844836 .3312359
-1.46 0.147 -1.142851 .1738836
tw_load | -1.954404 .4024388
-4.86 0.000 -2.754295 -1.154514
------------------------------------------------------------------------------
. For example, the intercept of year 7 is 21.503=13.1597-{.8677*(-1.3024) + (-.4845)*12.6271 + (-1.9544)*.5607}. As discussed previously, the standard errors of the within effects model need to be adjusted. For instance, the correct standard error of fuel price is computed as .364 = .3312*sqrt(87/72).
5.2.2 Using the TSCSREG and PANEL procedures
PROC SORT DATA=masil.airline;
BY year airline;
PROC PANEL DATA=masil.airline;
ID year airline;
MODEL cost = output fuel load /FIXONE;
RUN;
Fixed One Way Estimates
Dependent Variable: cost
Model Description
Estimation Method FixOne
Number of Cross Sections 15
Time Series Length 6
Fit Statistics
SSE 1.0882 DFE 72
MSE 0.0151 Root MSE 0.1229
R-Square 0.9905
F Test for No Fixed Effects
Num DF Den DF F Value Pr > F
14 72 1.17 0.3178
Parameter Estimates
Standard
Variable DF Estimate Error t Value Pr > |t| Label
CS1 1 -2.04096 0.7347 -2.78 0.0070 Cross Sectional
Effect 1
CS2 1 -1.95873 0.7228 -2.71 0.0084 Cross Sectional
Effect 2
CS3 1 -1.88103 0.7204 -2.61 0.0110 Cross Sectional
Effect 3
CS4 1 -1.79601 0.6988 -2.57 0.0122 Cross Sectional
Effect 4
CS5 1 -1.33693 0.5060 -2.64 0.0101 Cross Sectional
Effect 5
CS6 1 -1.12514 0.4086 -2.75 0.0075 Cross Sectional
Effect 6
CS7 1 -1.03341 0.3764 -2.75 0.0076 Cross Sectional
Effect 7
CS8 1 -0.88274 0.3260 -2.71 0.0085 Cross Sectional
Effect 8
CS9 1 -0.70719 0.2947 -2.40 0.0190 Cross Sectional
Effect 9
CS10 1 -0.42296 0.1668 -2.54 0.0134 Cross Sectional
Effect 10
CS11 1 -0.07144 0.0718 -1.00 0.3228 Cross Sectional
CS12 1 0.114571 0.0984 1.16 0.2482 Cross Sectional
Effect 12
CS13 1 0.079789 0.0844 0.95 0.3477 Cross Sectional
Effect 13
CS14 1 0.015463 0.0726 0.21 0.8320 Cross Sectional
Effect 14
Intercept 1 22.53677 4.9405 4.56 <.0001 Intercept
output 1 0.867727 0.0154 56.32 <.0001
fuel 1 -0.48448 0.3641 -1.33 0.1875
load 1 -1.9544 0.4424 -4.42 <.0001
PROC TSCSREG DATA=masil.airline;
ID year airline;
MODEL cost = output fuel load /FIXONE;
RUN;
. xtreg cost output fuel load, fe i(year)
Group variable (i): year Number of groups = 15
R-sq: within = 0.9858 Obs per group: min = 6
between = 0.4812 avg = 6.0
overall = 0.5265 max = 6
F(3,72) = 1668.37
corr(u_i, Xb) = -0.1503 Prob > F = 0.0000
------------------------------------------------------------------------------
cost | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
output | .8677268 .0154082 56.32 0.000 .8370111 .8984424
fuel | -.4844835 .3641085 -1.33 0.188 -1.210321 .2413535
load | -1.954404 .4423777 -4.42 0.000 -2.836268 -1.07254
_cons | 21.66698 4.624053 4.69 0.000 12.4491 30.88486
-------------+----------------------------------------------------------------
sigma_u | .8027907
sigma_e | .12293801
rho | .97708602 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(14, 72) = 1.17 Prob > F = 0.3178
--> REGRESS;Lhs=COST;Rhs=ONE,OUTPUT,FUEL,LOAD;Panel;Str=YEAR;Fixed$
| OLS Without Group Dummy Variables |
| Ordinary least squares regression Weighting variable = none |
| Dep. var. = COST Mean= 13.36560933 , S.D.= 1.131971444 |
| Model size: Observations = 90, Parameters = 4, Deg.Fr.= 86 |
| Residuals: Sum of squares= 1.335449522 , Std.Dev.= .12461 |
| Fit: R-squared= .988290, Adjusted R-squared = .98788 |
| Model test: F[ 3, 86] = 2419.33, Prob value = .00000 |
| Diagnostic: Log-L = 61.7699, Restricted(b=0) Log-L = -138.3581 |
| LogAmemiyaPrCrt.= -4.122, Akaike Info. Crt.= -1.284 |
| Panel Data Analysis of COST [ONE way] |
| Unconditional ANOVA (No regressors) |
| Source Variation Deg. Free. Mean Square |
| Between 37.3068 14. 2.66477 |
| Residual 76.7341 75. 1.02312 |
| Total 114.041 89. 1.28136 |
+-----------------------------------------------------------------------+
+---------+--------------+----------------+--------+---------+----------+
|Variable | Coefficient | Standard Error |t-ratio |P[|T|>t] | Mean of X|
+---------+--------------+----------------+--------+---------+----------+
OUTPUT .8827386341 .13254552E-01 66.599 .0000 -1.1743092
FUEL .4539777119 .20304240E-01 22.359 .0000 12.770359
LOAD -1.627507797 .34530293 -4.713 .0000 .56046016
Constant 9.516912231 .22924522 41.514 .0000
(Note: E+nn or E-nn means multiply by 10 to + or -nn power.)
+-----------------------------------------------------------------------+
| Least Squares with Group Dummy Variables |
| Ordinary least squares regression Weighting variable = none |
| Dep. var. = COST Mean= 13.36560933 , S.D.= 1.131971444 |
| Model size: Observations = 90, Parameters = 18, Deg.Fr.= 72 |
| Residuals: Sum of squares= 1.088193393 , Std.Dev.= .12294 |
| Fit: R-squared= .990458, Adjusted R-squared = .98820 |
| Model test: F[ 17, 72] = 439.62, Prob value = .00000 |
| Diagnostic: Log-L = 70.9836, Restricted(b=0) Log-L = -138.3581 |
| LogAmemiyaPrCrt.= -4.010, Akaike Info. Crt.= -1.177 |
| Estd. Autocorrelation of e(i,t) .573531 |
+-----------------------------------------------------------------------+
+---------+--------------+----------------+--------+---------+----------+
|Variable | Coefficient | Standard Error |t-ratio |P[|T|>t] | Mean of X|
+---------+--------------+----------------+--------+---------+----------+
OUTPUT .8677268093 .15408179E-01 56.316 .0000 -1.1743092
FUEL -.4844946699 .36410984 -1.331 .1868 12.770359
LOAD -1.954414378 .44237791 -4.418 .0000 .56046016
(Note: E+nn or E-nn means multiply by 10 to + or -nn power.)
+------------------------------------------------------------------------+
| Test Statistics for the Classical Model |
| |
| Model Log-Likelihood Sum of Squares R-squared |
| (1) Constant term only -138.35814 .1140409821D+03 .0000000 |
| (2) Group effects only -120.52864 .7673414157D+02 .3271354 |
| (3) X - variables only 61.76991 .1335449522D+01 .9882897 |
| (4) X and group effects 70.98362 .1088193393D+01 .9904579 |
| |
| Hypothesis Tests |
| Likelihood Ratio Test F Tests |
| Chi-squared d.f. Prob. F num. denom. Prob value |
| (2) vs (1) 35.659 14 .00117 2.605 14 75 .00404 |
| (3) vs (1) 400.256 3 .00000 2419.329 3 86 .00000 |
| (4) vs (1) 418.684 17 .00000 439.617 17 72 .00000 |
| (4) vs (2) 383.025 3 .00000 1668.364 3 72 .00000 |
| (4) vs (3) 18.427 14 .18800 1.169 14 72 .31776 |
+------------------------------------------------------------------------+
. collapse (mean) tm_cost=cost (mean) tm_output=output (mean) tm_fuel=fuel (mean) tm_load=load, by(year)
. regress tm_cost tm_output tm_fuel tm_load // between time effect
-------------+------------------------------ F( 3, 11) = 4074.33
Model | 6.21220479 3 2.07073493 Prob > F = 0.0000
Residual | .005590631 11 .000508239 R-squared = 0.9991
-------------+------------------------------ Adj R-squared = 0.9989
Total | 6.21779542 14 .444128244 Root MSE = .02254
------------------------------------------------------------------------------
tm_cost | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
tm_output | 1.133337 .0512898 22.10 0.000 1.020449 1.246225
tm_fuel | .3342486 .0228284 14.64 0.000 .2840035 .3844937
tm_load | -1.350727 .2478264 -5.45 0.000 -1.896189 -.8052644
_cons | 11.18505 .3660016 30.56 0.000 10.37949 11.99062
------------------------------------------------------------------------------
PROC PANEL DATA=masil.airline;
ID airline year;
MODEL cost = output fuel load /BTWNT;
RUN;
Between Time Periods Estimates
Dependent Variable: cost
Model Description
Estimation Method BtwTime
Number of Cross Sections 6
Time Series Length 15
Fit Statistics
SSE 0.0056 DFE 11
MSE 0.0005 Root MSE 0.0225
R-Square 0.9991
Parameter Estimates
Standard
Variable DF Estimate Error t Value Pr > |t| Label
Intercept 1 11.18504 0.3660 30.56 <.0001 Intercept
output 1 1.133335 0.0513 22.10 <.0001
fuel 1 0.334249 0.0228 14.64 <.0001
load 1 -1.35073 0.2478 -5.45 0.0002
. xtreg cost output fuel load, be i(year) // between time effect model
--> REGRESS;Lhs=COST;Rhs=ONE,OUTPUT,FUEL,LOAD;Panel;Str=YEAR;Means$
5.4 Testing Fixed Time Effects.
. The p-value of .3180 does not reject the null hypothesis.
PROC REG DATA=masil.airline;
MODEL cost = t1-t14 output fuel load;
TEST t1=t2=t3=t4=t5=t6=t7=t8=t9=t10=t11=t12=t13=t14=0;
RUN;
. quietly regress cost t1-t14 output fuel load
. test t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14
Up: Table of Contents
Next: The Fixed Group Time Effect Model
Prev: The Fixed Group Effect Model



