Skip to content

Commit 859a69b

Browse files
Add Metal test with few fixed effects (#275)
Added a test case for regression with period fixed effects.
1 parent 89e61c5 commit 859a69b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/fit.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,11 @@ end
721721
local m = @formula Wage ~ Emp + fe(Firm) + fe(Year)
722722
local x = reg(df, m, weights = :Output, method = method, double_precision = false)
723723
@test coef(x) [- 0.043475472188120416] atol = 1e-3
724+
# check Metal with very few fixed effects
725+
df.period = df.Year .>= 1980
726+
local m = @formula Wage ~ Emp + fe(Firm) + fe(period)
727+
local x = reg(df, m, method = method, double_precision = false)
728+
@test coef(x) [-0.0879211] atol = 1e-3
724729
end
725730
end
726731

0 commit comments

Comments
 (0)