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
2
votes
1 answer

tab_corr, tab_df, and psych::describe on a mice mids object

I have imputed data saved as a mids object and am trying to adapt my usual workflow around imputed data. However, I cannot figure out how to use sjPlot's tab_corr() and tab_df() and psych's describe on a mids object. My goal is to generate a table…
jrcalabrese
  • 2,184
  • 3
  • 10
  • 30
2
votes
1 answer

How to only show fixed effect estimates of lmer model using sjPlot::plot_model

I would like to plot the estimates of the fixed effects of an lme4::lmer model. Currently, the sjPlot::plot_model output includes two additional plots that I do not want: SD (Observations) and SD (Intercept). How can I remove these two additional…
Sauterelle
  • 25
  • 5
2
votes
1 answer

How to change plot_model facet

I use the plot_model function of sjplot to plot regression models. The regression contains an outcome (C, with 3 levels) and 1 continuous predictor A and D and a categorical B. I would like to adjust the name of the facets (eg. change name instead…
Rstudent
  • 887
  • 4
  • 12
2
votes
0 answers

Namespace error when loading R package sjPlot

I am getting this error when loading the R package sjPlot library(sjPlot) Error: package or namespace load failed for 'sjPlot': 'data_partition' object was not exported by 'namespace:parameters' Somebody could help me.
Cristiano
  • 233
  • 1
  • 9
2
votes
1 answer

Plots with error bars using logistf object

I initially did a logistic model using the glm package but wanted to correct for separation so I have used the logistf function and I'm now trying to redo my plots. I'm unsure how to make a plot like the one below with a logistf object. A lot of…
2
votes
1 answer

Change variable labels in plot_model for random effects with sjPlot

I am trying to change the name of variable labels in a plot of random effects, but can't find a way. For a regular plot I would just use axis.labels but for type = re I can't find a way. How can I change the text from "country(Intercept) and…
2
votes
2 answers

How to save the output of tab_model()

Data exempel: lme1<- lme(total.fruits ~ rack + nutrient + amd + status, random = ~1|reg, method = "ML", data=Arabidopsis) How can I know save the output of the tab_model() function below? The tab_model() function is part of the sjPlot…
Matthew
  • 95
  • 1
  • 8
2
votes
1 answer

Why does tab_model (sjPlot) re-run MCMC with rstanarm model?

I am creating a table with tab_model from the package sjPlot (https://cran.r-project.org/web/packages/sjPlot/vignettes/tab_model_estimates.html). However, when I use a negative binomial rstanarm model object, tab_model re-runs MCMC chains. My actual…
Dylan_Gomes
  • 2,066
  • 14
  • 29
2
votes
2 answers

Creating a data frame that produces partially italicized cells with pkg:sjPlot functions

I am attempting to create a simple data table in which the genus name in the "Coral_taxon" column is italicized while the "spp." Portion following the genus name is not capitalized. I attempted to code each row for "Coral_taxon" using the…
Eric Dilley
  • 337
  • 2
  • 10
2
votes
1 answer

How can I add a layer showing the distribution on a conditional variable in a probability plot in R studio?

I am fitting the following regression: model <- glm(DV ~ conditions + predictor + conditions*predictor, family = binomial(link = "probit"), data = d). I use 'sjPlot' (and 'ggplot2') to make the following…
Ingrid
  • 25
  • 5
2
votes
1 answer

Error in plot_model(type="diag") : arguments imply differing number of rows error

I was doing a regression analysis and made regression model with this code, regrs_2 <- lm(gii.score ~ hof.pdi + hof.idv + hof.mas + hof.uai + hof.ltowvs + hof.ivr + ctnt.dummy.asia + ctnt.dummy.europe + ctnt.dummy.noram + …
slepmst
  • 23
  • 4
2
votes
1 answer

ggpredict error with lm_robust model including fixed effects and clustered standard errors

I am running a regression on two independent variables and their interaction, along with district fixed effects and clustering the standard errors at the observation level using lm_robust command from estimatr (version 0.22.0) with R version 3.6.0.…
2
votes
1 answer

how to summarise multiple logistic regression models in a table?

I have a dataset with age as continuous and as a factor, sex as a factor and 4 groups. structure(list(Age = c(9, 12, 16, 57), Age_1 = structure(c(2L, 3L, 3L, 7L), .Label = c("8", "1", "2", "3", "4", "5", "6", "7" ), class = "factor"), Sex =…
sar
  • 182
  • 6
  • 26
2
votes
1 answer

How to CHANGE dot color, position and value size in plot_models function

Q1: the plot_models function. yes, dot size can be settled, but the value size and position are not working. value.size= is not working here. how to fix it? Q2: see the figure below, the color of dots is automatically set, is there any way I could…
George Nee
  • 21
  • 3
2
votes
0 answers

"arguments imply differing number of rows: 0, 1" error in tab_model, package sjPlot

I'm stumped here and hoping that someone can help me out. I'm running a crude Cox PH model for a dichotomous predictor ("base_factor") and time of death. The modelruns without errors and the results can be displayed with summary(), as well as…
1 2
3
18 19