Learn R Programming

games (version 1.1.2)

latexTable: LaTeX table for strategic models

Description

Makes a LaTeX table of strategic model results.

Usage

latexTable(x, digits = max(3, getOption("digits") - 2), scientific = NA, blankfill = "", math.style.negative = TRUE, file = "", floatplace = "htbp", caption = NULL, label = NULL, rowsep = 2, useboot = TRUE)

Arguments

x
a fitted model of class game.
digits
number of digits to print.
scientific
logical or integer value to control use of scientific notation. See format.
blankfill
text to fill empty cells (those where a certain variable did not enter the given equation).
math.style.negative
whether negative signs should be "math style" or plain hyphens. Defaults to TRUE.
file
file to save the output in. Defaults to "", which prints the table to the R console.
floatplace
where to place the table float; e.g., for \begin{table}[htp], use floatplace = "htp".
caption
caption to use (none if NULL)
label
reference label to use (none if NULL)
rowsep
amount of space (in points) to put between rows.
useboot
logical: use bootstrap estimates (if available) to calculate standard errors?

Value

x, invisibly.

Details

latexTable prints LaTeX code for the presentation of results from a strategic model. Each row contains one regressor, and each column contains one of the utility (or variance term) equations in the model. For example, in a model fit with egame12, the four columns will be u11, u13, u14, and u24 respectively. Each cell contains the estimated parameter, atop its standard error in parentheses. Cells that are empty because a regressor is not included in a particular equation are filled with the string specified in the option blankfill. Signorino and Tarar (2006, p. 593) contains a table of this variety.

The table generated depends on the multirow package for LaTeX, so make sure to include \usepackage{multirow} in the preamble of your document.

The digits option does not yet work seamlessly; you may have to resort to trial and error.

References

Curtis S. Signorino and Ahmer Tarar. 2006. "A Unified Theory and Test of Extended Immediate Deterrence." American Journal of Political Science 50(3):586--605.

Examples

Run this code
data("war1800")
f1 <- esc + war ~ s_wt_re1 + revis1 | 0 | balanc + revis1 | balanc
m1 <- egame12(f1, data = war1800)

latexTable(m1)
latexTable(m1, digits = 8)
latexTable(m1, blankfill = "--")  ## Dashes in blank cells

## Not run: 
#     latexTable(m1, file = "my_table.tex")  ## Write to file
# ## End(Not run)

Run the code above in your browser using DataLab