Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

style.df

Style of data.frames created by etable


Description

This function describes the style of data.frames created with the function etable.

Usage

style.df(
  depvar.title = "Dependent Var.:",
  fixef.title = "Fixed-Effects:",
  fixef.line = "-",
  fixef.prefix = "",
  fixef.suffix = "",
  slopes.title = "Varying Slopes:",
  slopes.line = "-",
  slopes.format = "__var__ (__slope__)",
  stats.title = "_",
  stats.line = "_",
  yesNo = c("Yes", "No"),
  headers.sep = TRUE,
  interaction.combine = " x ",
  i.equal = " = "
)

Arguments

depvar.title

Character scalar. Default is "Dependent Var.:". The row name of the dependent variables.

fixef.title

Character scalar. Default is "Fixed-Effects:". The header preceding the fixed-effects. If equal to the empty string, then this line is removed.

fixef.line

A single character. Default is "-". A character that will be used to create a line of separation for the fixed-effects header. Used only if fixef.title is not the empty string.

fixef.prefix

Character scalar. Default is "". A prefix to appear before each fixed-effect name.

fixef.suffix

Character scalar. Default is "". A suffix to appear after each fixed-effect name.

slopes.title

Character scalar. Default is "Varying Slopes:". The header preceding the variables with varying slopes. If equal to the empty string, then this line is removed.

slopes.line

Character scalar. Default is "-". A character that will be used to create a line of separation for the variables with varying slopes header. Used only if slopes.line is not the empty string.

slopes.format

Character scalar. Default is "__var__ (__slope__)". The format of the name of the varying slopes. The values __var__ and __slope__ are special characters that will be replaced by the value of the variable name and slope name, respectively.

stats.title

Character scalar. Default is "_". The header preceding the statistics section. If equal to the empty string, then this line is removed. If equal to single character (like in the default), then this character will be expanded to take the full column width.

stats.line

Character scalar. Default is "_". A character that will be used to create a line of separation for the statistics header. Used only if stats.title is not the empty string.

yesNo

Character vector of length 1 or 2. Default is c("Yes", "No"). Used to inform on the presence or absence of fixed-effects in the estimation. If of length 1, then automatically the second value is considered as the empty string.

headers.sep

Logical, default is TRUE. Whether to add a line of separation between the headers and the coefficients.

interaction.combine

Character scalar, defaults to " x ". When the estimation contains interactions, then the variables names (after aliasing) are combined with this argument. For example: if dict = c(x1="Wind", x2="Rain") and you have the following interaction x1:x2, then it will be renamed (by default) Wind x Rain – using interaction.combine = "*" would lead to Wind*Rain.

i.equal

Character scalar, defaults to " = ". Only affects factor variables created with the function i, tells how the variable should be linked to its value. For example if you have the Species factor from the iris data set, by default the display of the variable is Species = Setosa, etc. If i.equal = ": " the display becomes Species: Setosa.

Details

The title elements (depvar.title, fixef.title, slopes.title and stats.title) will be the row names of the returned data.frame. Therefore keep in mind that any two of them should not be identical (since identical row names are forbidden in data.frames).

Value

It returns an object of class fixest_style_df.

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)


# Default result
etable(est)

# Playing a bit with the styles
etable(est, style.df = style.df(fixef.title = "", fixef.suffix = " FE",
                                 stats.line = " ", yesNo = "yes"))

fixest

Fast Fixed-Effects Estimations

v0.10.0
GPL-3
Authors
Laurent Berge [aut, cre], Sebastian Krantz [ctb], Grant McDermott [ctb] (<https://orcid.org/0000-0001-7883-8573>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.