Katherine:y
can't you simply interact -treat- with -peak- in an unique regression?
can't you simply interact -treat- with -peak- in an unique regression?
. webuse auto (1978 Automobile Data) . reg mpg c.weight#i.foreign, robust Linear regression Number of obs = 74 F(2, 71) = 76.10 Prob > F = 0.0000 R-squared = 0.6714 Root MSE = 3.3626 ---------------------------------------------------------------------------------- | Robust mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval] -----------------+---------------------------------------------------------------- foreign#c.weight | Domestic | -.0066409 .0005421 -12.25 0.000 -.0077218 -.00556 Foreign | -.0075145 .0006839 -10.99 0.000 -.0088782 -.0061509 | _cons | 41.95073 1.794367 23.38 0.000 38.37286 45.52859 ---------------------------------------------------------------------------------- . reg mpg c.weight#i.foreign, robust coefl Linear regression Number of obs = 74 F(2, 71) = 76.10 Prob > F = 0.0000 R-squared = 0.6714 Root MSE = 3.3626 ---------------------------------------------------------------------------------- mpg | Coef. Legend -----------------+---------------------------------------------------------------- foreign#c.weight | Domestic | -.0066409 _b[0b.foreign#c.weight] Foreign | -.0075145 _b[1.foreign#c.weight] | _cons | 41.95073 _b[_cons] ---------------------------------------------------------------------------------- . test _b[0b.foreign#c.weight] = _b[1.foreign#c.weight] ( 1) 0b.foreign#c.weight - 1.foreign#c.weight = 0 F( 1, 71) = 5.24 Prob > F = 0.0251
gen treat1 = treat*peak gen treat0 = treat*(1-peak) reghdfe cons treat0 treat1 , absorb (i.location#i.hour i.hour#i.calday) vce(cluster i.location#i.hour) test treat0 = treat1
Comment