Questions tagged [sjplot]

sjPlot is a collection of several plotting and table output functions for data visualization o R.

About

Its a collection of several plotting and table output functions for data visualization. Results of several statistical analyses (that are commonly used in social sciences) can be visualized using this package, including simple and cross tabulated frequencies, histograms, box plots, (generalized) linear models (forest plots), PCA, correlations, cluster analyses, scatter plots etc.

Links

280 questions
0
votes
1 answer

How to assign title to series of tables

I'm going to create a series of table library(sjPlot) tables_models <- lapply(models_list_2, tab_model, show.ci = FALSE, show.se = TRUE, show.p = TRUE, show.stat = TRUE, show.df = TRUE, …
12666727b9
  • 1,133
  • 1
  • 8
  • 22
0
votes
1 answer

A strategy to build iteratively tables for fitted models statistics with sjPlot

I'm facing with this fitted models list: Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest'] Formula: value ~ COND + (1 | ID) Data: . REML criterion at convergence: 389.4 Scaled residuals: Min …
12666727b9
  • 1,133
  • 1
  • 8
  • 22
0
votes
0 answers

Function sjt.dt: function not found

I've just tried installing the package sjPlot as follows: library(devtools) devtools::install_github("sjPlot/devel") library(sjPlot) When I try running the following code with the sjt.df() function that is suppose to included into the…
12666727b9
  • 1,133
  • 1
  • 8
  • 22
0
votes
0 answers

edit tick mark labels on axis on R plot

I am using sjPlot to plot marginal effects in an interaction, and although I was able to set the axis to go from 1 to 7, only values 2, 4, and 6 appear as tick marks on the graph; I would like all values (0-7) to appear. Thank you! Code : specif<-…
0
votes
1 answer

Custom color palette for plot_likert function from sjPlot

I can plot with following data using plot_likert function from sjPlot R package. library(tidyverse) df1 <- data.frame( matrix( data = sample(x = c("Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"), size = 500, replace =…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
0
votes
1 answer

Plotting likert scales with plot_likert function from sjPlot

I have likert scale data in character format and want to plot it using plot_likert function from sjPlot R package. df1 <- data.frame( matrix( data = sample(x = c("Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"), size =…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
0
votes
1 answer

In R: tab_model (hide polynomials)

is there any way to hide the quadratic/polynomial terms in the regression output? It seems to show them by default which adds tons of rows, obviously. Thanks so much! Best Clemens
C_Hut
  • 31
  • 8
0
votes
1 answer

Every other x-axis label is plotted in ggplot2 when class is integer, but works when class is character

First I use set.theme() in sjPlot to set the theme for my ggplots: # library(ggplot2) # library(RColorBrewer) # library(sjPlot) # library(tidyr) set_theme( geom.outline.color = "antiquewhite4", geom.outline.size = .5, geom.label.size =…
ruggntub
  • 95
  • 5
0
votes
1 answer

adjust name of r2 in sjPlot: tab_model

Although I think it is not best practise to do so, I want to have a linear model and a linear mixed effect model in one table next to each other. I use sjPlot::tab_model. The problem occurs with r2. In the lm it computes the r2 and the adjusted r2.…
Annika
  • 49
  • 7
0
votes
0 answers

Why is my lmer output ignoring groups in my variables?

For a bit of context: I am trying to see the effect of 3 different mangrove species (A, L and R) on sediment characteristics, in this case the dependent variable is pH. I have 10 sites, which have been coded as random effect. SedLayer indicates the…
M F
  • 11
  • 2
0
votes
1 answer

Cannot access column when using for loop in R

bm is my dataset, I want to loop through the dataset, each time I take the column name and make a plot for (i in colnames(bm)) { print(i) print(plot_xtab(bm$y, bm$i, margin = "row", bar.pos = "stack", …
Tony Guo
  • 3
  • 1
0
votes
1 answer

What are the default error intervals for plot_model?

I am using sjPlot::plot_model to plot a lmer model. What are the default error bars? Here is my model: p <- lmer(dv~iv1+ factor(iv2)+ (1+iv1+factor(iv2)|subject)) Here is the plot model with no specification to the error intervals: p <-…
0
votes
1 answer

Is there a way to convert the HTML tab_model object into an R object, like a data.frame or tibble?

Is there a way to convert the HTML tab_model object into an R object, like a data.frame or tibble? Please let me know if/when you can. Thanks. Here is the code I used to create the tab_model object: # Loads packages # ---- NOTE: making plots…
Mel
  • 510
  • 3
  • 10
0
votes
1 answer

Plotting an interaction with confidence intervals from an lme4 or LmerTest model in R

Using dat (found here), I run the following model: library(lmerTest) model <- lmerTest::lmer(eval ~ post + ess + post*ess + (1|ID), data = dat) The output of summary(model) indicates the interaction term is significant: Linear mixed model fit by…
J.Q
  • 971
  • 1
  • 14
  • 29
0
votes
1 answer

Omit m.labels in plot of many regressions with sjPlot

Is there a way of supressing the labels of "Dependent Variables" in a plot like the following? It is a simple regression plot made with the following code: library(sjPlot) plot_models( Mod1, Mod2, Mod3, axis.labels = c("Diferença de…