R-code related question- balance tests

Hi!
I am doing a project for an econometrics class in R, and I am having some trouble finding out how to replicate a specific table(image below) in R, since it is a Balance Test. I have already researched about it, but I never get the same table. I was hoping someone would know which R code I should use.
Thank you

Looks to me much like LaTeX-Tables I produced back at University.
It seems RMarkdown can produce LaTeX as described in this blogpost

Here is an example from Overleaf somewhat similar to your, that you could use as a starting point: Multi-sensor Fusion Rules - Overleaf, Online LaTeX Editor
Tables are always a headache with LaTeX, but the results are worth the price! :smiley:

2 Likes

You can get close to this with {pander} or {kableExtra}, but @macjo16 is right—for full-fig publication quality you need to output to pdf and do a fair amount of LaTeX dark art, using xtable and perhaps shell scripting like

pandoc main.Rmd --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output main.pdf --template /Users/rc/steamer/thematicR/packrat/lib/x87_64-apple-darwin13.4.0/3.2.1/rmarkdown/rmarkdown/templates/tufte_handout/resources/tufte-handout.tex --highlight-style pygments --latex-engine /Library/TeX/texbin/xelatex

or even lua filters to pandoc. It all depends on the data, the layout desired and facility with LaTeX.

See the FAQ: How to do a minimal reproducible example reprex for beginners. Data is key. It doesn't have to be all your data, or even your data at all. And, come to think of it, is your question presentation (which is what we've been discussing) or does it have to do with the calculations?

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.