create_felm_formulas: Add 'felm' specifications to control grid for 'starbility'...

Description Usage Arguments Value

View source: R/create_stability_plot.R

Description

create_felm_formulas is the second step of a starbility plot, following create_grid. It is generally called directly by stability_plot, but the user can also call it manually.

Usage

1
create_felm_formulas(grid., perm., lhs., rhs., ...)

Arguments

grid

A dataframe generated by create_grid, or a data frame of the same structure as those created by create_grid.

lhs

A string indicating the name of the outcome variable in data.

rhs

A string indicating the name of the explanatory variable for which coefficient estimates will be plotted.

perm

A named dictionary in which values correspond to the sets of variables that should be iterated upon to produce the stability plot and names correspond to the names of these sets of variables that should be displayed in the plot.

base

Optional. A named dictionary in which values correspond to the sets of variables that should always be included in the model in all specifications and names correspond to the names of these sets of variables that should be displayed in the plot.

perm_fe

Optional. A named dictionary in which values correspond to the sets of fixed effects that should be iterated upon to produce the stability plot and names correspond to the names of these sets of variables that should be displayed in the plot. Functionally, these operate identically to perm; the difference is that starbility uses lfe to sweep them out of the normal equations, resulting in a performance boost over including them in perm.

nonperm_fe

Optional. A named dictionary in which values correspond to fixed effects that should be iterated upon to produce the stability plot and names correspond to the names of these sets of fixed effects that should be displayed in the plot. These fixed effects are included sequentially in the plot, one at a time – i.e. combinations of nonperm_fe are not included.

fe_always

Optional. A logical scalar. If one or more sets of fixed effects are specified in nonperm_fe, should the plot include only estimates from models with non-permuted fixed effects (rather than also including a set of estimates from models without any non-permuted fixed effects)? Defaults to F.

iv

Optional. A string indicating the variables which should be used to instrument rhs. If left unspecified, OLS coefficients are plotted.

cluster

Optional. A string indicating the name of the variable by which standard errors should be clustered. Defaults to no clustering.

Value

A data.frame containing all possible permutations of controls and a column with felm expressions.


AakaashRao/starbility documentation built on May 21, 2020, 9:49 a.m.