You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
has_fe_intercept =any(fe.interaction isa UnitWeights for fe in fes)
75
+
76
+
# remove intercept if absorbed by fixed effects
77
+
if has_fe_intercept
78
+
formula =FormulaTerm(formula.lhs, tuple(InterceptTerm{false}(), (term for term ineachterm(formula.rhs) if!isa(term, Union{ConstantTerm,InterceptTerm}))...))
79
+
end
80
+
has_intercept =hasintercept(formula)
81
+
82
+
74
83
if has_fes
75
-
ifany([isa(fe.interaction, Ones) for fe in fes])
76
-
formula =FormulaTerm(formula.lhs, tuple(ConstantTerm(0), (t for t ineachterm(formula.rhs) if t!=ConstantTerm(1))...))
77
-
has_fes_intercept =true
84
+
ifany(fe.interaction isa UnitWeights for fe in fes)
85
+
has_fe_intercept =true
78
86
end
79
87
fes = FixedEffect[fe[esample] for fe in fes]
80
88
feM =AbstractFixedEffectSolver{Float64}(fes, weights, Val{:cpu})
0 commit comments