sjplot

regression models in r output table to word

吃可爱长大的小学妹 提交于 2021-01-27 06:33:49
问题 I have been using sjplot to create a combined table. This creates a HTML table. I would like to make a table that can be exported to word. I have reviewed this post which discusses copy and pasting into word, but this alters the formatting of the columns and lines. Output several regression tables into multiple pages of a Word document in R n1 <- glm(N ~ Age_2 , data = n_data, family = "binomial") g1 <- glm(G ~ Age_2 , data = g1_data, family = "binomial") ga1 <- glm(G_1 ~ Age_2 , data = ga1

regression models in r output table to word

寵の児 提交于 2021-01-27 06:33:01
问题 I have been using sjplot to create a combined table. This creates a HTML table. I would like to make a table that can be exported to word. I have reviewed this post which discusses copy and pasting into word, but this alters the formatting of the columns and lines. Output several regression tables into multiple pages of a Word document in R n1 <- glm(N ~ Age_2 , data = n_data, family = "binomial") g1 <- glm(G ~ Age_2 , data = g1_data, family = "binomial") ga1 <- glm(G_1 ~ Age_2 , data = ga1

regression models in r output table to word

吃可爱长大的小学妹 提交于 2021-01-27 06:32:29
问题 I have been using sjplot to create a combined table. This creates a HTML table. I would like to make a table that can be exported to word. I have reviewed this post which discusses copy and pasting into word, but this alters the formatting of the columns and lines. Output several regression tables into multiple pages of a Word document in R n1 <- glm(N ~ Age_2 , data = n_data, family = "binomial") g1 <- glm(G ~ Age_2 , data = g1_data, family = "binomial") ga1 <- glm(G_1 ~ Age_2 , data = ga1

Summary Statistics table with factors and continuous variables

萝らか妹 提交于 2020-06-27 03:55:07
问题 I am trying to create a simple summary statistics table (min, max, mean, n, etc) that handles both factor variables and continuous variables, even when there is more than one factor variable. I'm trying to produce good looking HTML output, eg stargazer or huxtable output. For a simple reproducible example, I'll use mtcars but change two of the variables to factors, and simplify to three variables. library(tidyverse) library(stargazer) mtcars_df <- mtcars mtcars_df <- mtcars_df %>% mutate(vs =

Output several regression tables into multiple pages of a Word document in R

≡放荡痞女 提交于 2020-04-14 07:28:19
问题 My goal is to create a multi-page Microsoft Word document with many formatted regression table outputs on consecutive pages. Ideally this would be done using R Markdown. I have had some luck making nicely formatted regression tables in word using sjPlot::tab_model So for example, I can do mod2 <- lm(Petal.Length ~ Species + Petal.Width, data=iris) sjPlot::tab_model(mod2, file = "~/Desktop/model2.doc") to create a nice-looking regression table in a new Word document. If I do mod3 <- lm(Petal

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

﹥>﹥吖頭↗ 提交于 2020-02-25 06:10:05
问题 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 reorder summary statistics such as $R^2$ , AIC , etc? library("sjPlot") lm1 <- lm(mpg ~ cyl, mtcars) lm2 <- lm(mpg ~ hp, mtcars) lm3 <- lm(mpg ~ cyl + hp, mtcars) tab_model(lm1, lm2, lm3, show.ci = 0, show.aic = 1, show.loglik = 1, show.fstat = 1,

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

风流意气都作罢 提交于 2020-02-25 06:06:31
问题 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 reorder summary statistics such as $R^2$ , AIC , etc? library("sjPlot") lm1 <- lm(mpg ~ cyl, mtcars) lm2 <- lm(mpg ~ hp, mtcars) lm3 <- lm(mpg ~ cyl + hp, mtcars) tab_model(lm1, lm2, lm3, show.ci = 0, show.aic = 1, show.loglik = 1, show.fstat = 1,

Colored ribbons and different linetypes in sjPlot plot_model()

限于喜欢 提交于 2020-01-06 02:21:06
问题 I want to use plot_model() from the sjPlot package to plot predicted values of a model with both different linetypes and colored ribbons . I also want the linetypes and ribbon colors to show up in the legend . I did find a way to make this work using ggpredict() and ggplot(), but I would much prefer using the plot_model() function as it saves me writing a lot of code when having to fit and plot a lot of models for my projects. I did try two different ways shown below, but neither worked for

“there is no package called” error during installation of sjPlot

耗尽温柔 提交于 2019-12-25 17:03:14
问题 library("sjPlot", lib.loc="~/R/win-library/3.2") Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘pbkrtest’ Error: package or namespace load failed for ‘sjPlot’ > sjp.lmer(fitted2, type = "fe") Error: could not find function "sjp.lmer" I have installed the package, so does anyone know why this is giving me this error message above after I enter the following code? Thanks library(lme4) sjp.lmer(fitted2, type = "fe") 回答1: It

save multiple plots r into separate jpg

旧街凉风 提交于 2019-12-12 03:02:50
问题 Dear Stackoverflow'ers! I have simple database, app. 130 variables, 1500 records and lots of similar plots to create. I try to avoid save them by hand. The for loop works perfectly for plots (in RStudio). Here are the data as .csv on dropbox. data <- read.csv2("data.csv", header=TRUE) data <- select(data,v1,v2,v3,v4,v5,v6,v7) for (i in data) { sjp.frq(i) } I would like to save the plots in some directory as a separate .png or .jpg files. I found some clues here. The code looks like this: data