create_model_estimates: Estimate control grid models.

Description Usage Arguments Value

View source: R/create_stability_plot.R

Description

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

Usage

1
create_model_estimates(grid., data., lhs., rhs., perm., ...)

Arguments

...

Optional. Additional parameters to be passed to model.

grid

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

data

A dataframe containing the variables included in the model.

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.

model

Optional. A function that takes at least three arguments: spec (a string containing the model specification), data (the data frame containing the variables in the model), and rhs (the name of the coefficient of interest). Arbitrary additional arguments are permitted. The function should then output a vector containing, in order, the coefficient estimate, the p-value, the bottom value of the error region, and the top value of the error region. If left unspecified, uses default implementation of felm (from lfe).

Value

A data.frame containing model estimates.


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