Hi all, I have a question about handling panel data for my regression.
I have accounting data for 2018-2021 and one of the things I would like to investigate is the impact of covid time (2019-2020) on my dependent variable. I have solved this by having 2020-2021 take on a dummy variable with a value of 1, while 2018 and 2019 equals 0.
Since this is a panel dataset (with about 4000 company-year observations), I thought of using a fixed-effects structure.
However, in addition to the Covid variable, I also have control variables that I am interested in. Problem here is that some of them are also time invariant variables (dummy variables).
1) Does it make sense in my case to use a normal OLS regression without firm fixed effects?
2) And/or does it make sense to include the industry or year effects? I can't use xtset as far as I know, because I have multiple year values for each industry.
3) I found similar literature, they use year effects. But I don't really get this approach, since I believe that the covid variable (or any other dummy variable for a specific period of more than one year) would be omitted as it is either 0 or 1 for each company and each year? Maybe I have a problem with understand time-fixed-effects in general?
So my ideas are:
[1] using xtreg firm fixed effects
[2] using reg (with another control DUMMY named "bigfour"), optional with yearly and industry dummys
Maybe there is somebody who can help me out. Thanks in advance!
Oliver
I have accounting data for 2018-2021 and one of the things I would like to investigate is the impact of covid time (2019-2020) on my dependent variable. I have solved this by having 2020-2021 take on a dummy variable with a value of 1, while 2018 and 2019 equals 0.
Since this is a panel dataset (with about 4000 company-year observations), I thought of using a fixed-effects structure.
However, in addition to the Covid variable, I also have control variables that I am interested in. Problem here is that some of them are also time invariant variables (dummy variables).
1) Does it make sense in my case to use a normal OLS regression without firm fixed effects?
2) And/or does it make sense to include the industry or year effects? I can't use xtset as far as I know, because I have multiple year values for each industry.
3) I found similar literature, they use year effects. But I don't really get this approach, since I believe that the covid variable (or any other dummy variable for a specific period of more than one year) would be omitted as it is either 0 or 1 for each company and each year? Maybe I have a problem with understand time-fixed-effects in general?
So my ideas are:
[1] using xtreg firm fixed effects
Code:
xt set cid year, yearly
xtreg x covid l_ta g_ta rev g_rev lev roa, fe robust
Fixed-effects (within) regression Number of obs = 3,859
Group variable: cid Number of groups = 1,606
R-squared: Obs per group:
Within = 0.0921 min = 1
Between = 0.0695 avg = 2.4
Overall = 0.1099 max = 4
F(5,1605) = .
corr(u_i, Xb) = -0.0520 Prob > F = .
(Std. err. adjusted for 1,606 clusters in cid)
------------------------------------------------------------------------------
| Robust
x | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
covid | -.0140561 .0024709 -5.69 0.000 -.0189026 -.0092095
l_ta | 3.33e-10 1.22e-10 2.74 0.006 9.44e-11 5.72e-10
g_ta | -.0254269 .0113404 -2.24 0.025 -.0476703 -.0031834
rev | 7.21e-11 2.45e-10 0.29 0.768 -4.08e-10 5.52e-10
g_rev | -.0003467 .0001308 -2.65 0.008 -.0006032 -.0000902
lev | .0101033 .0278399 0.36 0.717 -.0445031 .0647096
roa | .0928653 .0723525 1.28 0.199 -.0490501 .2347807
_cons | -.0639366 .0078016 -8.20 0.000 -.0792389 -.0486342
-------------+----------------------------------------------------------------
sigma_u | .0640711
sigma_e | .06053789
rho | .52833159 (fraction of variance due to u_i)
------------------------------------------------------------------------------
Code:
reg x covid ta rev lev roa bigfour g_ta g_rev i.year i.twodigit_sic, vce(cluster cid)
note: 2021.year omitted because of collinearity.
Linear regression Number of obs = 3,859
F(59, 1605) = .
Prob > F = .
R-squared = 0.2600
Root MSE = .06753
(Std. err. adjusted for 1,606 clusters in cid)
------------------------------------------------------------------------------
| Robust
x | Coefficient std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
covid | -.0116073 .003618 -3.21 0.001 -.0187039 -.0045108
ta | 1.76e-10 8.33e-11 2.12 0.035 1.28e-11 3.40e-10
rev | 1.67e-10 1.69e-10 0.99 0.322 -1.64e-10 4.98e-10
lev | .0031512 .0017026 1.85 0.064 -.0001883 .0064908
roa | .1478102 .0477302 3.10 0.002 .0541902 .2414301
bigfour | .0019411 .0031699 0.61 0.540 -.0042765 .0081586
g_ta | -.0001111 .00278 -0.04 0.968 -.0055639 .0053417
g_rev | -.0001028 .0000502 -2.05 0.041 -.0002012 -4.38e-06
|
year |
2019 | -.0035314 .0031567 -1.12 0.263 -.0097232 .0026604
2020 | -.0045705 .0028864 -1.58 0.114 -.010232 .0010909
2021 | 0 (omitted)
|
twodigit_sic |
11 | -.0326513 .0180882 -1.81 0.071 -.0681302 .0028277
13 | -.0597535 .0186302 -3.21 0.001 -.0962957 -.0232113
14 | .0100855 .0110892 0.91 0.363 -.0116653 .0318363
15 | -.0331442 .0115617 -2.87 0.004 -.0558219 -.0104666
16 | -.0258045 .0121684 -2.12 0.034 -.0496722 -.0019368
17 | -.0228705 .0134615 -1.70 0.090 -.0492744 .0035335
20 | -.028753 .0110764 -2.60 0.010 -.0504786 -.0070273
22 | -.0432182 .0140865 -3.07 0.002 -.0708481 -.0155882
23 | -.0609575 .013594 -4.48 0.000 -.0876214 -.0342936
24 | -.0233472 .0120563 -1.94 0.053 -.0469949 .0003006
25 | -.0344124 .0196741 -1.75 0.080 -.073002 .0041773
26 | -.0139861 .0118215 -1.18 0.237 -.0371733 .0092012
27 | .0075537 .0133156 0.57 0.571 -.018564 .0336714
28 | -.0337714 .0106625 -3.17 0.002 -.0546853 -.0128575
29 | -.0253099 .013235 -1.91 0.056 -.0512695 .0006497
30 | -.0218135 .0116708 -1.87 0.062 -.0447051 .001078
31 | -.0117472 .0122857 -0.96 0.339 -.0358449 .0123506
32 | -.0118238 .011187 -1.06 0.291 -.0337664 .0101189
33 | -.0330857 .0119646 -2.77 0.006 -.0565535 -.0096179
34 | -.0292258 .01224 -2.39 0.017 -.0532339 -.0052177
35 | -.0372191 .0108387 -3.43 0.001 -.0584785 -.0159596
36 | -.0553792 .0110493 -5.01 0.000 -.0770519 -.0337066
37 | -.0354371 .0107114 -3.31 0.001 -.0564469 -.0144274
38 | -.0406668 .0121054 -3.36 0.001 -.0644109 -.0169228
39 | -.025075 .0124073 -2.02 0.043 -.0494113 -.0007388
42 | -.0200684 .0132655 -1.51 0.131 -.046088 .0059511
43 | -.0273522 .020539 -1.33 0.183 -.0676384 .0129339
44 | -.0285849 .0128329 -2.23 0.026 -.0537559 -.003414
45 | -.0292021 .0138622 -2.11 0.035 -.0563921 -.0020121
47 | -.0190299 .0143599 -1.33 0.185 -.047196 .0091362
48 | -.0329512 .0133756 -2.46 0.014 -.0591867 -.0067156
49 | -.0247978 .0103086 -2.41 0.016 -.0450175 -.004578
50 | -.0448464 .0138254 -3.24 0.001 -.0719641 -.0177287
51 | -.0376785 .0123326 -3.06 0.002 -.0618683 -.0134887
52 | .0005802 .0159843 0.04 0.971 -.030772 .0319325
54 | -.0198686 .0139814 -1.42 0.155 -.0472923 .0075551
55 | -.0271398 .0155502 -1.75 0.081 -.0576406 .0033611
56 | -.0279485 .013474 -2.07 0.038 -.0543769 -.00152
57 | -.0288976 .0130188 -2.22 0.027 -.0544333 -.0033619
58 | -.0227824 .0112934 -2.02 0.044 -.0449338 -.0006311
59 | -.0441197 .0130006 -3.39 0.001 -.0696195 -.0186198
70 | -.0170041 .0111651 -1.52 0.128 -.0389038 .0048956
72 | .0097644 .0127679 0.76 0.445 -.0152791 .0348079
73 | -.0596236 .0106738 -5.59 0.000 -.0805597 -.0386876
75 | -.0357424 .0177867 -2.01 0.045 -.0706301 -.0008547
78 | -.121909 .0227795 -5.35 0.000 -.1665897 -.0772284
79 | -.0746395 .0178088 -4.19 0.000 -.1095704 -.0397086
80 | -.0278888 .0120545 -2.31 0.021 -.0515331 -.0042445
83 | .0039482 .0153572 0.26 0.797 -.0261741 .0340706
87 | -.0462577 .0134836 -3.43 0.001 -.0727051 -.0198103
89 | -.0202485 .0157858 -1.28 0.200 -.0512115 .0107145
|
_cons | -.0213707 .0099822 -2.14 0.032 -.0409502 -.0017912
Oliver

Comment