Sets/gets the default dictionary used in the function etable, did_means and coefplot. The dictionaries are used to relabel variables (usually towards a fancier, more explicit formatting) when exporting them into a Latex table or displaying in graphs. By setting the dictionary with setFixest_dict, you can avoid providing the argument dict.

setFixest_dict(dict)

getFixest_dict()

Arguments

dict

A named character vector. E.g. to change my variable named "a" and "b" to (resp.) "$log(a)$" and "$bonus^3$", then use dict = c(a="$log(a)$", b3="$bonus^3$"). This dictionary is used in Latex tables or in graphs by the function coefplot. If you want to separate Latex rendering from rendering in graphs, use an ampersand first to make the variable specific to coefplot.

Author

Laurent Berge

Examples


data(trade)
est = feols(log(Euros) ~ log(dist_km)|Origin+Destination+Product, trade)
# we export the result & rename some variables
esttex(est, dict = c("log(Euros)"="Euros (ln)", Origin="Country of Origin"))
#> \begin{table}[htbp]
#>    \caption{no title}
#>    \centering
#>    \begin{tabular}{lc}
#>       \tabularnewline \midrule \midrule
#>       Dependent Variable: & Euros (ln)\\  
#>       Model:              & (1)\\  
#>       \midrule
#>       \emph{Variables}\\
#>       log(dist\_km)       & -2.169$^{***}$\\   
#>                           & (0.1542)\\   
#>       \midrule
#>       \emph{Fixed-effects}\\
#>       Country of Origin   & Yes\\  
#>       Destination         & Yes\\  
#>       Product             & Yes\\  
#>       \midrule
#>       \emph{Fit statistics}\\
#>       Observations        & 38,325\\  
#>       R$^2$               & 0.70402\\  
#>       Within R$^2$        & 0.21827\\  
#>       \midrule \midrule
#>       \multicolumn{2}{l}{\emph{Clustered (Country of Origin) standard-errors in parentheses}}\\
#>       \multicolumn{2}{l}{\emph{Signif. Codes: ***: 0.01, **: 0.05, *: 0.1}}\\
#>    \end{tabular}
#> \end{table}

# If you export many tables, it can be more convenient to use setFixest_dict:
setFixest_dict(c("log(Euros)"="Euros (ln)", Origin="Country of Origin"))
esttex(est) # variables are properly relabeled
#> \begin{table}[htbp]
#>    \caption{no title}
#>    \centering
#>    \begin{tabular}{lc}
#>       \tabularnewline \midrule \midrule
#>       Dependent Variable: & Euros (ln)\\  
#>       Model:              & (1)\\  
#>       \midrule
#>       \emph{Variables}\\
#>       log(dist\_km)       & -2.169$^{***}$\\   
#>                           & (0.1542)\\   
#>       \midrule
#>       \emph{Fixed-effects}\\
#>       Country of Origin   & Yes\\  
#>       Destination         & Yes\\  
#>       Product             & Yes\\  
#>       \midrule
#>       \emph{Fit statistics}\\
#>       Observations        & 38,325\\  
#>       R$^2$               & 0.70402\\  
#>       Within R$^2$        & 0.21827\\  
#>       \midrule \midrule
#>       \multicolumn{2}{l}{\emph{Clustered (Country of Origin) standard-errors in parentheses}}\\
#>       \multicolumn{2}{l}{\emph{Signif. Codes: ***: 0.01, **: 0.05, *: 0.1}}\\
#>    \end{tabular}
#> \end{table}