texreg | Conversion of R Regression Output to LaTeX or HTML Tables | Data Visualization library
kandi X-RAY | texreg Summary
kandi X-RAY | texreg Summary
Conversion of R Regression Output to LaTeX or HTML Tables. Converts coefficients, standard errors, significance stars, and goodness-of-fit statistics of statistical models into LaTeX tables or HTML tables/MS Word documents or to nicely formatted screen output for the R console for easy model comparison. A list of several models can be combined in a single table. The output is highly customizable. New model types can be easily implemented.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of texreg
texreg Key Features
texreg Examples and Code Snippets
Community Discussions
Trending Discussions on texreg
QUESTION
My code should be a pretty easy knit to a pdf, but it will not compile and I'm getting this message in R Markdown:
! LaTeX Error: Unicode character ₁ (U+2081) not set up for use with LaTeX.
Error: LaTeX failed to compile L-work-5.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See L- work-5.log for more info. Execution halted
here is the code:
...ANSWER
Answered 2022-Apr-03 at 00:22For a start, try deleting the special characters ₁
and ₂
in the line
two independent variables, X~₁i~ and X~₂i~
This will let you compile.
You might be able to get this to work by including something like
QUESTION
I am estimating a regression model with some factor/categorial variables and some numerical ones. Is it possible to display the reference category for each factor/categorial variable in the summary of the regression model?
Ideally this would translate also to texreg or stargazer to have latex output, but having them in the summary of the regression would already be a good start.
Does anybody have an Idea, what am I missing?
...ANSWER
Answered 2021-Dec-23 at 09:20The reference level is the one that is missing in the summary, because the coefficients of the other levels are the contrasts to the reference level, i.e. the intercept actually represents the mean in the reference category.
QUESTION
I'm using plotreg()
from the texreg
package to display coefficient and CI estimates, but I find that I was not able to reproduce graphical output with layout similar to those done by others. For example, using the working example here:
ANSWER
Answered 2021-Dec-08 at 05:35It looks like a lattice plot to me. There are three major plotting paradigms: base, lattice and ggplot. If you execute:
QUESTION
I'm wondering how to tweak plotreg()
's gl()
function (it's function from the texreg
package) to accommodate variables labels that contain super- or sub-scripts?
I've experimented with expression()
and paste()
but to no avail. I provide a working example (from their documentation) at below:
ANSWER
Answered 2021-Nov-07 at 21:35Here is how to change the axis labels with ggplot2.
QUESTION
Background
I'm using the irr
package in R
to generate some inter-rater reliability statistics for a project I'm doing. Here's an example of Fleiss's Kappa using the package's built-in data:
ANSWER
Answered 2021-Oct-11 at 19:00If we directly apply the data.frame
on the output, it wouldn't work because of the class
QUESTION
How can you remove gof rows from a texreg table? In my specific case, I'd like to remove the R2, Adj. R2, and F statistic rows.
I'm using texreg version 1.37.5 and R version 4.1.1. The default table rows I get from texreg in addition to headings and coefficients are R2, Adj. R2, Num. obs., and RMSE.
The answer here (R texreg: How can I select the gof statistics to be displayed?) is implemented in the code below but does not work. Possibly the package changed in the last few years since this response was posted.
A look at the texreg documentation here, under the omit.coef
section, indicates that you can remove gof rows using extract
but the link is broken.
SSCCE:
...ANSWER
Answered 2021-Sep-01 at 13:51This answer is based on texreg
version 1.37.5.
Observe that the objects are of class lm_robust
:
QUESTION
I recently updated my OS, packages, RStudio and R and I tried to run a .Rmd file that worked fine before all the updates. When I ran the .Rmd, I was getting the an error at the end (after it reachd 100%) when trying to render a PDF document (seen below). After breaking up and running my Rmarkdown file piece by piece, I discovered the problem was the scalebox =
argument I used to produce a table with texreg
. I'm glad I discovered the issue but I am curious why scalebox does not work in an Rmarkdown document anymore. Reprex below (if you remove scalebox = .75
, it will render just fine). Any thoughts?
ANSWER
Answered 2020-Sep-23 at 19:54To use scalebox = 0.75
, texreg
needs to use the graphicx
package. It isn't set up to work with knitr
, so it just outputs the \usepackage{graphicx}
command ahead of the table, where it's illegal. I imagine you're supposed to cut and paste the output into your document, with that line going into the preamble instead of the body.
To work around this design, just set use.packages = FALSE
in the call to texreg()
. Since knitr
already uses graphicx
, that's sufficient.
If you get the same error with some package that knitr
doesn't include (maybe you used siunitx = TRUE
, which needs the siunitx
package), then you'll need to display the result to figure out which package it needs, and then add that to the YAML of the document, e.g.
QUESTION
I have a data frame with estimates from multiple models, each ran on a separate country sample.
...ANSWER
Answered 2020-Sep-11 at 17:07Like this?
QUESTION
When using texreg
I frequently use omit.coef
to remove certain estimates (for fixed effects) as below.
ANSWER
Answered 2020-Aug-09 at 09:26You'd have to consider regex instead, separated by an |
. Example:
QUESTION
I'm trying to exponentiate coefficients and standard errors from multiple Poisson models from a MuMIn::dredge
object to use with texreg::screenreg
. In the case of one model we can do this:
ANSWER
Answered 2020-Jul-29 at 13:57texreg
's extract
method for the "averaging" object returns a list of texreg
objects, with one element for each model. You need to apply @coef
and @se
to each element. For example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install texreg
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page