2

I have these three Models

model <- lmer(dgentav14 ~ p95*Financial_Open_Logged + IIP_GDP + gent + loggdpt + growtht + unempt + factor(topic) + factor(wave) + (1 | country), data = data_master1, REML = FALSE)

model2 <- lmer(dgentav14 ~ p05*Financial_Open_Logged + IIP_GDP + gent + loggdpt + growtht + unempt + factor(topic) + factor(wave) + (1 | country), data = data_master1, REML = FALSE)

model3 <- lmer(dgentav14 ~ p50*Financial_Open_Logged + IIP_GDP + gent + loggdpt + growtht + unempt + factor(topic) + factor(wave) + (1 | country), data = data_master1, REML = FALSE)

models1 = list(model, model2, model3)

When I run the original function without specifying the coef_map I do get all the variables in the model summary

modelsummary(models1, vcov = vcov, stars = TRUE)

however, once I specify the name and the order of my coefficients and get the modelsummary, the interaction Terms 'p95 × Financial_Open_Logged' are not being displayed.

cm <- c('(Intercept)' = 'Intercept', 'p95' = 'Preferences of the richest 5%', 'p05' = 'Preferences of the poorest 5%', 'p50' = 'Preferences of the median', 'Financial_Open_Logged' = 'Logged Financial Openness', 'IIP_GDP' = 'International Investment Position', 'p95 × Financial_Open_Logged' = 'Preferences P95', 'p95*Financial_Open_Logged' = 'Preferences P95')

modelsummary(models1, vcov = vcov, stars = TRUE, coef_map = cm)

modelsummary(models1, vcov = vcov, stars = TRUE, coef_map = cm)

I have tried leaving it as 'p95 × Financial_Open_Logged' and changed it to 'p95*Financial_Open_Logged' but none of it worked so far.

2 Answers2

0

I can not tell you why, but for me it worked when I used : to specify the interaction terms in cm. So maybe try:

`cm <- c('(Intercept)' = 'Intercept', 'p95' = 'Preferences of the richest 5%', 'p05' = 'Preferences of the poorest 5%', 'p50' = 'Preferences of the median', 'Financial_Open_Logged' = 'Logged Financial Openness', 'IIP_GDP' = 'International Investment Position', 'p95:Financial_Open_Logged' = 'Preferences P95', 'p95:Financial_Open_Logged' = 'Preferences P95')
flxflks
  • 498
  • 2
  • 13
0

Validation of what @flxflks wrote. The exact spelling of your coefficients can be checked using coef(model).

nalist
  • 1