a system for formatting tables - fm ·  · 2010-11-05a system for formatting tables john luke...

31
A System for Formatting Tables John Luke Gallup Portland State University [email protected]

Upload: trinhanh

Post on 22-Apr-2018

217 views

Category:

Documents


3 download

TRANSCRIPT

A System for Formatting

TablesJ o h n L u k e G a l l u p

P o r t l a n d S t a t e U n i v e r s i t yj l g a l l up@pdx . edu

The Goal

Write publication-ready statistics tables

Like goal of Stata’s graphics

The Goal

Write publication-ready statistics tables

Like goal of Stata’s graphics

Best has been the enemy of the good

Third complete rewrite of software

The tasks

Complete control of:

The tasks

Complete control of:

Table design

The tasks

Complete control of:

Table design

Combining tables (merge and append)

The tasks

Complete control of:

Table design

Combining tables (merge and append)

Fonts, spacing, justification, etc.

The tasks

Complete control of:

Table design

Combining tables (merge and append)

Fonts, spacing, justification, etc.

Output native Word & TEX files

3 Main Table Types

3 Main Table Types

Estimation results (outreg, estimates table)

3 Main Table Types

Estimation results (outreg, estimates table)

Frequencies (tabulate)

3 Main Table Types

Estimation results (outreg, estimates table)

Frequencies (tabulate)

Summary statistics (table, tabstat)

Stata Matrix(of stats)

frmttable.ado

Row Titles

Numerical Formats,Brackets,

Annotations+

Column Titles

Title

Text

Notes

Text

Stata Matrix(of stats)

frmttable.ado

Row Titles

Numerical Formats,Brackets,

Annotations+

Column Titles

Title

Text

Notes

Text

Stata Matrix(of stats)

frmttable.ado

Row Titles

Numerical Formats,Brackets,

Annotations+

Column Titles

Title

Text

Notes

Text

Stata Matrix(of stats)

frmttable.ado

Create Mata Struct of String Matrices

struct FrmtTabl

body

Create Mata Struct of String Matrices

struct FrmtTablpretext

notes

posttext

title

+struct FrmtTabl

fonts

spacing

justification

lines

etc.

+struct FrmtTabl

fonts

spacing

justification

lines

etc.

+

Wordfile

struct FrmtTabl

fonts

spacing

justification

lines

etc.

+

Wordfile

or TEXfile

struct FrmtTabl

Table asWord document

Text formattingfonts, footnotes, column span, verticle and horizontal lines

outreg Word file

outreg TeX file

multiple statistics

Further Steps

Complete documentation for frmttable.ado, outreg.ado, outtab.ado

Set default formatting values for FrmtTabl (fonts, output file types, even titles)

Write to .docx & .xlsx XML formats (colors, speadsheet, etc.)

Conclusion frmttable.ado provides presentation-ready formatting for Stata tables

Fast

Memory efficient

Easily extensible

Stata wishes

Unicode support!

Save r( ) matrices after table.ado

Save r( ) matrices for varlist after summarize

String matrices in Stata to pass to Mata