1
$\begingroup$

I have two models to estimate the effect of x1 on y (one is a two-way fixed effects model and the other one a first-difference model). Now I want to find out if the coefficient for x1 between the two models differs with statistical significance by computing the standard errors for beta1_fe - beta1_fd with a x2-level clustered bootstrap. Anyone knows how I could do this in R?

fe_model <- plm(y ~ x1 + as.factor(x2) + as.factor(x3),
             data = dt)
fd_model <- plm(y ~ x1 + as.factor(x3),
             model = "fd",
             index = c("x2","x3"),
             data = dt)

$\endgroup$
4
  • 4
    $\begingroup$ When x3 and x4 are in the model, the very meaning of the coefficient of x1 changes. Is it possible you want to test whether the combination of x3 and x4 is significant? $\endgroup$
    – whuber
    Commented Jun 9, 2023 at 20:47
  • $\begingroup$ Echoing @whuber Why do you want to do this? $\endgroup$
    – Peter Flom
    Commented Jun 10, 2023 at 0:05
  • $\begingroup$ One is a first difference model and the other model a fixed effects model, the coefficients should have the same interpretation and I want to see if the estimates differ significantly across the two models. I update my question above. $\endgroup$
    – jacob2881
    Commented Jun 10, 2023 at 10:35
  • 3
    $\begingroup$ A general approach that may work well enough is to bootstrap the difference in coefficients and get a bootstrap confidence interval for the difference. Use the bootstrap studentized method, basic bootstrap, or BCa bootstrap. Avoid the bootstrap nonparametric percentile method as it tends to produce less accurate confidence coverage. $\endgroup$ Commented Jun 10, 2023 at 11:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.