Hi all. I'm running a difference-in-difference model with the new xtdidregress command. When I include a covariate into the model, it is dropped due to collinearity. In the data below, age categories are represented in both treatment and non-treatment periods among those who are treatment and control but all categories are dropped for collinearity. Any insight is greatly appreciated.

I'm running the following command:

Code:
xtdidregress (outcome) (treatment i.age), group(s_id) time(date)
over this data:

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input long(s_id age) float(treatment outcome date)
 1 5 0 184651.55 22159
 1 5 0  82871.38 22189
 1 5 0  96836.21 22220
 1 5 0  150408.8 22250
 1 5 0  90614.09 22281
 1 5 0   76972.7 22312
 1 5 0  179932.1 22340
 1 5 0  98147.79 22371
 1 5 0 132788.45 22401
 1 5 0  90510.57 22432
 1 5 0 116713.52 22462
 2 8 0 150288.34 22159
 2 8 0  94765.55 22189
 2 8 0 119890.66 22220
 2 8 0  77675.71 22250
 2 8 0  94513.68 22281
 2 8 0  73417.01 22312
 2 8 0  166039.4 22340
 2 8 1  79045.31 22371
 2 8 1 112765.08 22401
 2 8 1  61917.29 22432
 2 8 1  47182.07 22462
 3 4 0 120466.13 22159
 3 4 0 136616.69 22189
 3 4 0  178579.5 22220
 3 4 0  67578.11 22250
 3 4 0   78697.2 22281
 3 4 0  65052.36 22312
 3 4 0 141612.17 22340
 3 4 1 144666.33 22371
 3 4 1  80008.53 22401
 3 4 1  62120.51 22432
 3 4 1 102847.13 22462
 4 5 0  144208.7 22159
 4 5 0  86267.93 22189
 4 5 0  133929.1 22220
 4 5 0  90369.95 22250
 4 5 0 116700.68 22281
 4 5 0 129235.23 22312
 4 5 0  155575.5 22340
 4 5 1  84908.49 22371
 4 5 1 113503.05 22401
 4 5 1  85949.52 22432
 4 5 1 109707.98 22462
 5 5 0 125656.77 22159
 5 5 0  116407.4 22189
 5 5 0 124626.95 22220
 5 5 0 101298.13 22250
 5 5 0  61160.92 22281
 5 5 0 166762.55 22312
 5 5 0 131777.28 22340
 5 5 0  136243.2 22371
 5 5 0   91059.4 22401
 5 5 0   74429.4 22432
 5 5 0  44813.84 22462
 6 8 0 163867.06 22159
 6 8 0 111163.52 22189
 6 8 0 118347.18 22220
 6 8 0  99840.05 22250
 6 8 0  133937.2 22281
 6 8 0 104361.66 22312
 6 8 0  125573.2 22340
 6 8 1 75448.695 22371
 6 8 1  110577.6 22401
 6 8 1   54480.7 22432
 6 8 1  59851.77 22462
 7 5 0  97096.16 22159
 7 5 0 113284.23 22189
 7 5 0  89904.12 22220
 7 5 0 120786.56 22250
 7 5 0   89178.2 22281
 7 5 0  56710.82 22312
 7 5 0 108731.16 22340
 7 5 0  78451.73 22371
 7 5 0 116685.66 22401
 7 5 0 148560.45 22432
 7 5 0  49385.41 22462
 8 6 0 101873.48 22159
 8 6 0 3641.2346 22189
 8 6 0 101395.68 22220
 8 6 0  92611.93 22250
 8 6 0  78200.69 22281
 8 6 0  78210.06 22312
 8 6 0  83796.98 22340
 8 6 1  85389.82 22371
 8 6 1  69654.22 22401
 8 6 1  106496.6 22432
 8 6 1  91407.28 22462
 9 7 0  175712.6 22159
 9 7 0  99107.95 22189
 9 7 0 143355.69 22220
 9 7 0 145312.97 22250
 9 7 0  148145.2 22281
 9 7 0  55264.02 22312
 9 7 0 123266.22 22340
 9 7 1  77954.15 22371
 9 7 1  94087.31 22401
 9 7 1  93076.03 22432
 9 7 1 76909.555 22462
10 5 0 151806.02 22159
end
label values s_id s_id
label def s_id 1 "001", modify
label def s_id 2 "003", modify
label def s_id 3 "004", modify
label def s_id 4 "007", modify
label def s_id 5 "008", modify
label def s_id 6 "009", modify
label def s_id 7 "010", modify
label def s_id 8 "011", modify
label def s_id 9 "012", modify
label def s_id 10 "013", modify
label values age age
label def age 4 "35-39", modify
label def age 5 "40-44", modify
label def age 6 "45-49", modify
label def age 7 "50-54", modify
label def age 8 "55-59", modify