| style.tex {fixest} | R Documentation |
Style definitions for Latex tables
Description
This function describes the style of Latex tables to be exported with the function etable.
Usage
style.tex(
main = "base",
depvar.title,
model.title,
model.format,
line.top,
line.bottom,
var.title,
fixef.title,
fixef.prefix,
fixef.suffix,
fixef.where,
slopes.title,
slopes.format,
fixef_sizes.prefix,
fixef_sizes.suffix,
stats.title,
notes.intro,
notes.tpt.intro,
tablefoot,
tablefoot.value,
yesNo,
tabular = "normal",
depvar.style,
no_border,
caption.after,
rules_width,
signif.code,
tpt,
arraystretch,
adjustbox = NULL,
fontsize,
interaction.combine = " $\\times$ ",
i.equal = " $=$ "
)
Arguments
main |
Either "base", "aer" or "qje". Defines the basic style to start from. The styles "aer" and "qje" are almost identical and only differ on the top/bottom lines. |
depvar.title |
A character scalar. The title of the line of the dependent variables
(defaults to |
model.title |
A character scalar. The title of the line of the models (defaults to
|
model.format |
A character scalar. The value to appear on top of each column. It defaults
to |
line.top |
A character scalar equal to |
line.bottom |
A character scalar equal to |
var.title |
A character scalar. The title line appearing before the variables (defaults to
|
fixef.title |
A character scalar. The title line appearing before the fixed-effects
(defaults to |
fixef.prefix |
A prefix to add to the fixed-effects names. Defaults to |
fixef.suffix |
A suffix to add to the fixed-effects names. Defaults to |
fixef.where |
Either "var" or "stats". Where to place the fixed-effects lines?
Defaults to |
slopes.title |
A character scalar. The title line appearing before the variables with
varying slopes (defaults to |
slopes.format |
Character scalar representing the format of the slope variable name.
There are two special characters: "var" and "slope", placeholers for the variable
and slope names. Defaults to |
fixef_sizes.prefix |
A prefix to add to the fixed-effects names. Defaults to |
fixef_sizes.suffix |
A suffix to add to the fixed-effects names. Defaults
to |
stats.title |
A character scalar. The title line appearing before the statistics
(defaults to |
notes.intro |
A character scalar. Some tex code appearing just before the notes,
defaults to |
notes.tpt.intro |
Character scalar. Only used if |
tablefoot |
A logical scalar. Whether or not to display a footer within the table.
Defaults to |
tablefoot.value |
A character scalar. The notes to be displayed in the footer.
Defaults to |
yesNo |
A character vector of length 1 or 2. Defaults to |
tabular |
(Tex only.) Character scalar equal to "normal" (default), |
depvar.style |
Character scalar equal to either |
no_border |
Logical, default is |
caption.after |
Character scalar. Tex code that will be placed right after the caption.
Defaults to |
rules_width |
Character vector of length 1 or 2. This vector gives the width of the
|
signif.code |
Named numeric vector, used to provide the significance codes with respect to
the p-value of the coefficients. Default is |
tpt |
(Tex only.) Logical scalar, default is FALSE. Whether to use the |
arraystretch |
(Tex only.) A numeric scalar, default is |
adjustbox |
(Tex only.) A logical, numeric or character scalar, default is |
fontsize |
(Tex only.) A character scalar, default is |
interaction.combine |
Character scalar, defaults to |
i.equal |
Character scalar, defaults to |
Details
The \\checkmark command, used in the "aer" style (in argument yesNo), is in the
amssymb package.
The commands \\toprule, \\midrule and \\bottomrule are in the booktabs package.
You can set the width of the top/bottom rules with \\setlength\\heavyrulewidth\{wd\},
and of the midrule with \\setlength\\lightrulewidth\{wd\}.
Note that all titles (depvar.title, depvar.title, etc) are not escaped, so they
must be valid Latex expressions.
Value
Returns a list containing the style parameters.
See Also
Examples
# Multiple estimations => see details in feols
aq = airquality
est = feols(c(Ozone, Solar.R) ~
Wind + csw(Temp, Temp^2, Temp^3) | Month + Day,
data = aq)
# Playing a bit with the styles
etable(est, tex = TRUE)
etable(est, tex = TRUE, style.tex = style.tex("aer"))
etable(est, tex = TRUE, style.tex = style.tex("aer",
var.title = "\\emph{Expl. Vars.}",
model.format = "[i]",
yesNo = "x",
tabular = "*"))