sjPlot
sjPlot copied to clipboard
requesting a few arguements for tab_model()
Previous version sjt.glm() has a few arguments that become unavailable in tab_model(). I like to ask to bring string.est, string.obs, and string.interc back.
Plus, it will be handy to have exp.coef= back if I want to keep regression coefficients rather than showing odd ratios. Thanks.
exp.coef
is now named transform
. The other options are indeed missing, as I thought they're rarely needed. However, I could re-implement them.
Thanks! The availability of the updated package (including this issue and the one I posted for sjmisc::frq() regarding wrights) will help my students who are working with the packages when finalizing their projects.
Following my previous request, it will be nice to have show.loglik and string.dv back. Thanks.
- [x] string.est
- [ ] string.obs
- [x] string.interc
- [ ] string.dv
- [x] show.loglik
string.est = "Estimate" does not work. Logit model still shows Log-Odds.
Thanks, should be fixed now.
I updated the sjPlot package this morning, but no change for the table heading. It still shows Log-Odds.
Here is what I am calling:
tab_model(mylogit, show.est=TRUE, string.est = "Estimate",transform = NULL, digits = 4 )
Updated from GitHub or CRAN?
I updated from CRAN.
I like to add a request for "encoding=" for this function. The html table output needs this feature as much as it does for tab_xtab(). The whole class of my students are looking forward to this feature so that they could present their findings results smoothly by the end of the semester. Thanks for your attention!
I am still wondering if the feature above (encoding for tab_model() ) will be considered. Thanks.
shows.obs = TRUE is not working for me. Is there an alternative way to show the number of observations? Thanks
hm, can't reproduce:
library(sjPlot)
#> #refugeeswelcome
library(sjmisc)
data(efc)
efc <- to_factor(efc, c161sex, e42dep, c172code)
m <- lm(neg_c_7 ~ pos_v_4 + c12hour + e42dep + c172code, data = efc)
tab_model(m, show.obs = TRUE)
|
Negative impact with 7 |
||
---|---|---|---|
Predictors |
Estimates |
CI |
p |
(Intercept) |
17.66 |
16.03 – 19.29 |
<0.001 |
Positive value with 4 |
-0.67 |
-0.77 – -0.56 |
<0.001 |
average number of hours |
0.01 |
0.01 – 0.02 |
<0.001 |
elder’s dependency: |
0.84 |
-0.09 – 1.78 |
0.077 |
elder’s dependency: |
1.74 |
0.81 – 2.66 |
<0.001 |
elder’s dependency: |
3.10 |
2.11 – 4.09 |
<0.001 |
carer’s level of |
0.13 |
-0.44 – 0.69 |
0.655 |
carer’s level of |
0.70 |
-0.02 – 1.42 |
0.057 |
Observations |
818 |
||
R2 / R2 adjusted |
0.298 / 0.292 |
tab_model(m, show.obs = FALSE)
|
Negative impact with 7 |
||
---|---|---|---|
Predictors |
Estimates |
CI |
p |
(Intercept) |
17.66 |
16.03 – 19.29 |
<0.001 |
Positive value with 4 |
-0.67 |
-0.77 – -0.56 |
<0.001 |
average number of hours |
0.01 |
0.01 – 0.02 |
<0.001 |
elder’s dependency: |
0.84 |
-0.09 – 1.78 |
0.077 |
elder’s dependency: |
1.74 |
0.81 – 2.66 |
<0.001 |
elder’s dependency: |
3.10 |
2.11 – 4.09 |
<0.001 |
carer’s level of |
0.13 |
-0.44 – 0.69 |
0.655 |
carer’s level of |
0.70 |
-0.02 – 1.42 |
0.057 |
R2 / R2 adjusted |
0.298 / 0.292 |
Created on 2021-01-08 by the reprex package (v0.3.0)
Thanks @strengejacke. I see these examples, and I was thinking whether it is because I am using MaxLik for my models? I wonder whether there are cases which tab_model() does not support..
I am still wondering if the feature above (encoding for tab_model() ) will be considered. Thanks.
I see this feature was added into the newest version of sjPlot (2.8.7). Thank you @strengejacke.