create_grid: Create control grid for 'starbility' estimation.

Description Usage Arguments Value

View source: R/create_stability_plot.R

Description

create_grid is the first step of a starbility plot. It is generally called directly by stability_plot, but the user can also call it manually. This is generally done when creating custom formulas that work with packages other than those automatically supported by \codestarbility (currently, starbility supports only felm).

Usage

1
create_grid(perm, lhs, rhs, ...)

Arguments

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.

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.

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.

iv

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

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.

Value

A data.frame containing all possible permutations of controls.


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