If we use an interaction term that contains at least one term derived using I(), some coefficient names that contain I()does not show in .tex output and .pdf renders in Quarto. There is no problem for .html outputs and .html renders. I provide three scenarios below. Thank you!
library(modelsummary)
model1 <- lm(mpg ~ I(wt^2) * disp,
data = mtcars)
model2 <- lm(mpg ~ I(wt^2) * I(disp^2),
data = mtcars)
model3 <- lm(mpg ~ wt * I(disp^2),
data = mtcars)
modelsummary(model1, output = "table1.html") # Works fine
modelsummary(model2, output = "table2.html") # Works fine
modelsummary(model3, output = "table3.html") # Works fine
modelsummary(model1, output = "table1.tex") # all I() terms are missing in the coefficient names
modelsummary(model2, output = "table2.tex") # some I() terms are missing in the coefficient names
modelsummary(model3, output = "table3.tex") # some I() terms are missing in the coefficient names
Thanks a lot for the very useful report. I think I was able to fix this in version 1.4.3.9002, available now on Github. Let me know if you try it and it still doesn't work.
I()
, some coefficient names that containI()
does not show in.tex
output and.pdf
renders in Quarto. There is no problem for.html
outputs and.html
renders. I provide three scenarios below. Thank you!Figure for
.tex
outputs:sessionInfo()
output