create_plot_dfs: Create data frames for 'stabilityplot' plotting.

Description Usage Arguments Value

View source: R/create_stability_plot.R

Description

create_plot_dfs is the fourth step of a starbility plot, following create_model_estimates. It is generally called directly by stability_plot, but the user can also call it manually.

Usage

1

Arguments

grid

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

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.

sort

A string specifying how models should be sorted by coefficient value. The default is none, which preserves the order in which controls are permuted. Other options are asc (sorted by ascending coefficient values), desc (sorted by descending coefficient values), asc-by-fe (sorted by ascending coefficient values within non-permuted fixed effects groups, but preserving the order of these groups), and desc-by-fe (sorted by descending coefficient values within non-permuted fixed effects groups, but preserving the order of these groups).

Value

A list containing two data.frames: one corresponding to the coefficient panel and one corresponding to the control panel.


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