-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
predict currently raises an error, advising the user to estimate the model with the save = :fe kwarg and the access the fixed effects using fe().
If I'm not mistaken, this advise only covers the retrieval of fixed effects, but doesn't actually give a prediction. I'm currently doing:
fem = reg(df, @formula(y ~ x1 + x2 + fe(x3) + fe(x4)), save = :fe)
[df.x1 df.x2] * coef(fem) .+ fe(fem).fe_x3 .+ fe(fem).fe_x4
which I believe produces the correct predictions from the model (do correct me if I'm getting something wrong here!)
Could this be turned into a predict method, which accepts the fem object directly provided it has been estimated with save = :fe?
azev77
Metadata
Metadata
Assignees
Labels
No labels