Tab_Model
kdawg32 opened this issue · comments
Hi There,
I am having an issue with the 'tab_model' function. It does not produce a standardized t-statistic when I use it. I have 'show.std = TRUE' and in 'col.order' I have 'std.stat' present. In the end I still do not get a t-stat. I am running on R studio '2022.2.1', but I also have a lab mate running on the 'newest version', both of us got the same result. my 'sjPlot' package is version '2.8.1', 'sjmisc' is '2.8.9' and 'sjlabelled' is '1.2.0'.
Why would you expect the t-statistic to be different? Try calculating "estimate / standard error", and you get the same value (statistic) for the unstandardized and standardized model.
This usually changes when interactions are involved. Whenever the test statistic for the standardized coefficients differs from the unstandardized, you'll see two test-statistic columns, else only one. See these examples
model <- lm(Sepal.Width ~ Petal.Length + Petal.Width * Species, data = iris)
sjPlot::tab_model(model, show.std = TRUE, show.stat = TRUE)
model <- lm(Sepal.Width ~ Petal.Length + Petal.Width + Species, data = iris)
sjPlot::tab_model(model2, show.std = TRUE, show.stat = TRUE)
So I think you are tapping into my naivete with statistics here. The first set of models I used had interactions and those tables produce a standardized t-statistic. I now am using a group of models without the interaction term. So it seems I a trying to print something that does not matter. I was just confused because I was able to get standardized Beta coefficients but not the t-stat for the models w/o the interaction term.
Thank you for the clarification though, I greatly appreciate it!
Great that this is solved! Feel free to re-open this issue if you have further questions or found other bugs.