FixedEffects / FixedEffectModels.jl

Fast Estimation of Linear Models with IV and High Dimensional Categorical Variables
Other
227 stars 46 forks source link

Automate many FE #144

Closed azev77 closed 3 years ago

azev77 commented 3 years ago

Hey and thank you for this package! I have a Diff-In-Diff w/ many hand-made FE:

m_dyndid = reg(df, @formula(hpg ~
    t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10 +
    t11 + t12 + t13 + t14 + t15 + t16 + t17 + t18 + t19 + t20 +
    t21 + t22 + t23 + t24 + t25 + t26 + t27 + t28 + t29 + t30 +
    t31 + t32 + t33 + t34 + t35 + t36 + t37 + t38 + t39 + t40 +
    t41 + t42 + t43 + t44 + t45 + t46 + t47 + t48 + t49 + t50 +
    t51 + t52 + t53 + t54 + t55 + t56 + t57 + t58 + t59 + t60 +
    t61 + t62 + t63 + t64 + t65 + t66 + t67 + t68 + t69 + t70 +
    t71 + t72 + t73 + t74 + t75 + t76 + t77 + t78 + t79 + #t80 +
    t81 + t82 + t83 + t84 + t85 + t86 + t87 + t88 + t89 + t90 +
    t91 + t92 + t93 + t94 + t95 + t96 + t97 + t98 + t99 + t100 +
    t101 + t102 + t103 + t104 + t105 + t106 + t107 + t108 + t109 + t110 +
    t111 + t112 + t113 + t114 + t115 + t116 + t117 + t118 + t119 + t120
    + fe(loc) + fe(Date))
    )

Can this be automated like in STATA?

m_dyndid = reg(df, @formula(hpg ~ t1 - t79 + t81 - t120 + fe(loc) + fe(Date))   )
matthieugomez commented 3 years ago

I was going to tell you to ask this question on StatsModels — just saw you did it already. Thanks!

azev77 commented 3 years ago

@matthieugomez Just to be clear, if statsmodels make this possible, then it will work wherever formulas are used including your package?