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

Why is when running view_df() function?

I have ~11,000 customer surveys that I want to do some exploratory data analysis on. Running the view_df() function is omitting some information in the table, so I trimmed down the dataframe to just 3 columns to…
0
votes
0 answers

How do you fix incorrect predicted values ("pred") being used in the plot_model function in R?

I am trying to fix a plot that I generated that has the incorrect predicted values along the y-axis. The predicted values should be "Score," my outcome variable. For some reason, the "id" variable is along the y-axis instead. Everything else is…
0
votes
0 answers

Issue with including p-value stars using sjPlot tab_model

I am plotting the results of multiple regressions in R using tab_model from sjPlot. The regression results are produced, however, I am now trying to add simultaneous displays of the numeric p-values and their corresponding stars for significance. By…
flâneur
  • 633
  • 2
  • 8
0
votes
0 answers

Need to replicate the table of means with a hypothesis test on the difference of means

I am looking for an appropriate package to replicate the attached table: I tried simple tables, stargazer, gt, and sjPlot but didn't succeed. I am sure that one of these packages should work but I don't know which one I should dig.
Nikita
  • 1
  • 1
0
votes
1 answer

How to use sjplot in R function plot_grpfrq in a "facet grid" way based on another variable

I have three variables in my data frame. A, B and C. I am interested in the relative frequency of C given combinations of A & B. My dataset using dput: structure(list(B = structure(c(1L, 1L, 3L, 3L, 3L, 2L), .Label = c("text1", "text2", "text3"),…
canIchangethis
  • 87
  • 1
  • 10
0
votes
0 answers

How to create a different vline for 3 conditions?

I am trying to get a vline on a predicted plot until the sjplot::plot_model function. I have a paneled graph and for each condition (baseline, autonomous and fairness) I have a different vline I want to depict. Basically the point of divergence when…
G.T.G.
  • 1
0
votes
0 answers

labels of the X axis for all the plots were not informative

I wrote this code to loop through my dataset and generate multiple plots however, the labels of the X axis for all the plots were not informative for(i in 1:ncol(lfs)) { print(plot_xtab( grp = lfs$new_worker, …
0
votes
0 answers

How can I color the levels of my one predictor with sjPlot (plot_model)?

I have problems coloring the two levels of my predictor variable (group) when using plot_model, if I am just plotting one of the variables. Here is an example of that, where both groups are just black lines: library(sjPlot) n <- 30 dat <-…
BRB
  • 25
  • 4
0
votes
1 answer

Change scale in plot_model function

I am trying to use the plot_model() function (sjPlot package) in R. However, it only allow me to use the minimum range of x-axis as -1 to 1. Since my estimates are very small, I would like to change the range to -0.2 to 0.2. I have tried this…
Catherine
  • 161
  • 6
0
votes
1 answer

Custom Transform Coefficients sjPlot::tab_model - Expressing log transformed coefficients as percent change

I fit a log-transformed linear mixed effect model and want to express the coefficients as percent change instead of linear change on the log scale in my summary table with sjPlot Fake…
myfatson
  • 354
  • 2
  • 14
0
votes
1 answer

Plotting two(!) regression lines from a linear regression model ( > 3 predictors) into the same plot with confidence intervals (sjPlot or ggplot)

here's my problem: I have a linear regression model with 5 predictors, all of which use the same 6-point scale. I would like to plot two of the slopes (predictions) into one plot, including confidence intervals. Thus far, I've been trying to use…
format_0
  • 1
  • 1
0
votes
1 answer

Missing confidence intervals complicate model predictions and plots

I am running a model where the response variable is proportion, inflated with a majority of 'zero' and quite a few '1' responses, the terms of the model interact. I have therefore opted for a GALMSS model with family=BEINF. The model coefficients…
0
votes
0 answers

Modify axis on plotted model to log scale

I want to use the shown plot and generated it with plot_model(model, type="int") using sjPlot. But as you can see since one of the graphs overshoots by a lot the others can't be read properly. So i would like to scale the y-axis logarithmicly. How…
0
votes
1 answer

Plot_model predicts negative values for a proportional response variable

I am new to the Sjplot plot_model function. I am trying to plot a linear model, where the response variable is a proportion (min 0, max 1), yet when plotting this model the predicted values are plotted for negative values too. The simple model I…
Beardedant
  • 134
  • 8
0
votes
1 answer

Removing (n=0) from sjplot::plot_xtab

I'm trying to remove zero values from my visual using the plot_xtab function from the sjPlot package. I tried using drop.empty = FALSE, but that didn't seem to help. I just don't like the way the "n=0 (0%)" looks. Does anyone know if this function…