0
$\begingroup$

I'm working with panel data using the plm package in R to estimate a fixed effects model that includes interaction terms. I'm currently able to get my model results using plm and display them with stargazer, but I'm looking for a more refined way to present these results, specifically focusing on the interaction terms. Additionally, I need to calculate and display the marginal effects of these interaction terms, including their p-values, in the same table. I'm also interested in plotting these marginal effects to better understand their impact.

Here's an example of my plm model setup:

fe_model_interaction <- plm(life_satisfaction ~ 
                                  employment_level_Full_Time*care_low +
                                  employment_level_Full_Time*care_high +

                                  employment_level_Part_Time*care_low +
                                  employment_level_Part_Time*care_high+
                             
                                  other_control_variables,
                                  data = data_analyse_mother, 
                                  index = c("pid", "syear"), 
                                  model = "within")

My questions are:

  • What is the best way to display the plm model results, especially for interaction terms, in a more detailed and customizable format than what stargazer offers? I'm looking for a method to include standard errors, coefficients, and p-values in a clean and professional-looking table.

  • How can I calculate and include the marginal effects of these interaction terms in the results table, along with their p-values?

  • What are the recommended approaches or packages in R for plotting the marginal effects of interaction terms in a fixed effects model estimated with plm?

$\endgroup$
2
  • 1
    $\begingroup$ This is a duplicate of: stackoverflow.com/questions/77980923/… $\endgroup$
    – Vincent
    Feb 12 at 14:28
  • $\begingroup$ You might have over-specified the interaction terms in your model. It looks like employment_level is a categorical predictor with two levels, Full_Time and Part_time, and that care similarly has two levels, high and low. Is that the case? If so, it's probably best to change the formula in plm(). Please edit the question to say more about those predictors. Comments are easy to overlook and can be deleted. $\endgroup$
    – EdM
    Feb 13 at 19:14

0

Your Answer

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