Description Usage Arguments Details See Also Examples
This is a convenience wrapper around lfe::felm()
and binsreg::binsreg()
,
because I want the ease of Stata's binscatter.
1 |
formula |
A formula to estimate, of the form |
data |
Data to use |
x |
Independent variable of interest. May be a vector (as in |
... |
Other arguments passed to |
weights |
Optional vector of weights. Interpretation is the same as |
Important note: The standard errors here will not account for the fixed effects. This function is useful for plots, and is not recommended for inference.
binsreg::binsreg()
, lfe::felm()
1 2 3 4 5 | if (requireNamespace("binsreg", quietly=TRUE)) {
res <- binscatter(Sepal.Length ~ Sepal.Width + Petal.Length | Species, iris)
print(res$bins_plot)
res <- binscatter(Sepal.Length ~ Sepal.Width + Petal.Length | Species, iris, x="Petal.Length")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.