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
1
vote
0 answers

sjPlot reorder estimates using plot_models function

I'm attempting to plot the regression coefficients of two models in a single plot using sjPlot's plot_models function. I'd like to re-order the variables but cannot figure out a way to do so. It seems that the plot_models function does not have the…
CharlieW
  • 11
  • 1
1
vote
0 answers

R - How to plot a clmm2 model with sjPlot package

I have been able to make several beautiful plots with the plot_model function of the sjPlot package. However, I have not found a successful means by which to input a clmm2 model (from the ordinal package). Is there any known support or suggested…
jjcii
  • 139
  • 3
  • 10
1
vote
1 answer

Is there something wrong with the sjPlot package?

I'm trying to run this code using the sjPlot package ... library(sjPlot) likert_6 <- data.frame(as.factor(sample(1:6, 500, replace=T, prob=c(0.2,0.1,0.1,0.3,0.2,0.1))), as.factor(sample(1:6, 500, replace=T,…
user12756615
1
vote
2 answers

Aligning Effect Size Plots in R Markdown (using SJplot)

I think part of this question deals with sjPlot package, but I've found the package to be pretty flexible and to mirror ggplot, so I'm hoping someone has the answer. If you knit the code I've written below (using mtcars) into a pdf, you'll see that…
James
  • 459
  • 2
  • 14
1
vote
1 answer

R sjplot: How to angle the X axis labels and move them down?

In sjplot you can angle the x axis labels by adding axis.angle = # in the theme. However, this makes the label overlap the x-axis. How do you shift them down so everything is more easy to read? In ggplot, you can use hjust in the axis.text.x theme…
EagleEye
  • 47
  • 5
1
vote
0 answers

How convert sjplot sjt.corr() to dataframe in R

my intention is to know how I can extract or convert to data.frame or any other, well my goal is to try to use it in knitr with latex. library(foreign) library(sjPlot) tb = read.spss(file = "dates.sav",use.value.labels = T,to.data.frame = T) c =…
royer
  • 615
  • 1
  • 6
  • 19
1
vote
1 answer

Predictors are in random order in sjPlot using tab_model (r) (with reproducible code now)

I'm using the tab_model function in sjPlot in r. This function normally works smoothly for me, however, I noticed that the output table is oddly ordering variables in an order other than is in the lmer output. Data at the bottom of the…
Mikey
  • 11
  • 2
1
vote
0 answers

Combine marginal effects plot with scatter plot in R?

I am trying to create a plot in R that is a combination of a marginal effects slope line and a scatterplot of some averaged values. I can create both graphs separately, but I cannot figure out how to make a plot that includes both of these visuals…
1
vote
1 answer

sjPlot interaction plot_model. How to plot between major grid lines, edit graph for visual appeal

I am trying to plot predicted values for model containing an interaction. I would like to move the position of the x-axis values (factors) closer to the centre of the graph. Currently using sjPlot, plot_model() function and I have tried using…
g.race
  • 15
  • 4
1
vote
0 answers

Create MANOVA tables for publication using R?

I was wondering whether its possible to generate APA/publishable tables for MANOVA in R? There are various packages and methods (e.g. 'sjPlot', 'stargazer', 'apaTables') that seem to do the job for different forms of ANOVA and regression. It may…
Kai P
  • 23
  • 4
1
vote
1 answer

Use `texreg` to display AIC, BIC gof stats

I'm using texreg to generate output tables of regressions. I'd like to include statistics such as AIC, BIC and HQIC as Goodness of Fit statistics. Replicatible example below library(texreg) library(tidyverse) mtcars model1 <- lm(mpg ~ disp, data =…
Jeremy K.
  • 1,710
  • 14
  • 35
1
vote
1 answer

Interaction plots for continuous variables in logistic regression

I fitted a logistic regression model with a interaction between continuous predictors. I used plot_model() function in sjPlot package in R to get this interaction plots and i couldnt figure out how this function has categorized volume in to 2…
student_R123
  • 962
  • 11
  • 30
1
vote
0 answers

`sjPlot::tab_model()` summary statistics reordering and splitting of R-squared and R-squared-adjusted

I'm using sjPlot::tab_model() to create output tables of regressions. (Reproducible example below). Two quick questions about summary statistics below a table: Is there some way that I can report R^2 and R^2 adjusted on separate lines? How can I…
Jeremy K.
  • 1,710
  • 14
  • 35
1
vote
1 answer

Can't get "kr" p-value computation in tab_model (sjPlot) to work

I'm trying to summarize a lmer model with sjPlot::tab_model. It works until I try to get "kr" p-values to also obtain degrees of freedom. I have pbkrtest installed, and can use it separately, but it's unsuccessfully called by tab_model. Does anyone…
1
vote
1 answer

Plotting two lines corresponding to two different variables (and not having one of them be the legend) using plot_model or so

I am performing a multilevel (logistic) regression with two predictors, B and C. B and C have similar ranges so they can reasonably be shown using the same units in the x-axis. I want to do this because I want to highlight in my figure how they have…