Comments (1)
Thanks, probably the scale()
function is not properly removed from the term-names. I'll take a look.
Alternatively, you could use the ggeffects package directly, which is internally used by sjPlot. Using ggeffects for predictions is more flexible, and the plot()
method is easy to use and highly customizable (see, e.g., here and here).
model <- lme4::lmer(mpg ~ scale(hp) * wt + (1 | cyl), data = mtcars)
ggeffects::predict_response(model, terms = c("hp", "wt"))
#> # Predicted values of mpg
#>
#> wt: 2.24
#>
#> hp | Predicted | 95% CI
#> ------------------------------
#> 50 | 28.52 | 26.90, 30.13
#> 95 | 25.92 | 24.78, 27.06
#> 145 | 23.03 | 21.64, 24.42
#> 195 | 20.15 | 17.97, 22.33
#> 240 | 17.55 | 14.52, 20.58
#> 335 | 12.07 | 7.13, 17.00
#>
#> wt: 3.22
#>
#> hp | Predicted | 95% CI
#> ------------------------------
#> 50 | 21.83 | 20.00, 23.66
#> 95 | 20.46 | 19.15, 21.77
#> 145 | 18.94 | 17.92, 19.96
#> 195 | 17.42 | 16.17, 18.66
#> 240 | 16.05 | 14.31, 17.78
#> 335 | 13.16 | 10.11, 16.20
#>
#> wt: 4.2
#>
#> hp | Predicted | 95% CI
#> ------------------------------
#> 50 | 15.14 | 11.77, 18.51
#> 95 | 15.00 | 12.54, 17.46
#> 145 | 14.84 | 13.28, 16.41
#> 195 | 14.69 | 13.57, 15.81
#> 240 | 14.55 | 13.05, 16.04
#> 335 | 14.25 | 10.96, 17.53
#>
#> Adjusted for:
#> * cyl = 0 (population-level)
#>
#> Not all rows are shown in the output. Use `print(..., n = Inf)` to show
#> all rows.
Created on 2024-05-27 with reprex v2.1.0
from sjplot.
Related Issues (20)
- support for a quantile regression
- factor level labels not corresponding
- questions about *, ** and ***
- "Model has log-transformed response. Back-transforming predictions to original response scale. Standard errors are still on the log-scale." - solution? HOT 1
- `tab_model` not working with large `rlmerMod` model with compositional data
- Site Not Found HOT 1
- Wrong AIC values with tab_model HOT 2
- Plotting three-way interactions without panels?
- Confidence interval bands partially or completely disappear when axes rescaled
- Discrepancy between plot_model output and estimate from lmer summary #424 HOT 2
- Discrepancy between summary() and tab_model() for brms models HOT 5
- I installed the sjPlot package successfully but when I opened it with library I got that it called the estimability package HOT 5
- Problem with sjPlot HOT 2
- Couldn't report residual standard errors of lm object
- Enabling weights column in sjplot data selection
- Using tab_corr in an .rmd file
- Are signifcane asterisks reliable when using robust linear models (rlm) in combination with estimate plots (plot_model)? HOT 3
- Backtransformation of sqrt() transformed estimates using plot_model() HOT 3
- tab_model displaying incorrect estimates with glm() objects HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sjplot.