-
Notifications
You must be signed in to change notification settings - Fork 1
Description
@grantmcdermott I'm wondering if I could pick your brain about base R plot support (or more likely, using plot2). I've added support for fixest_multi usage (multiple y variables and/or split/fsplit samples). Now you can replace feols with fwlplot and it will just work :-)
I have the following dataset ready to plot from previous calls (see bottom for example of what the dataset would look like). If there is no split/fsplit, then sample is a character column of empty strings "".
For plotting, if there is both I do facet_grid(rows = var, cols = sample) if the estimation is split and multiple y variables. If there is only 1 of split or multiple y, then I use facet_wrap. Otherwise, what we have.
I saw your most recent comment here: grantmcdermott/tinyplot#76, and was wondering if this is something that might be easily possible in plot2?
sample idx var y_resid x_resid fit lwr upr
<char> <int> <char> <num> <num> <num> <num> <num>
7: cyl = 4 9 disp 2.291529e+01 4.627560e-01 2.286022e+01 1.229056e+01 3.342988e+01
8: cyl = 4 8 disp 5.531900e+01 1.039647e+00 5.135873e+01 3.308987e+01 6.962759e+01
9: cyl = 6 1 disp 8.526513e-12 -1.275000e-01 8.540724e-12 8.465837e-12 8.615610e-12
10: cyl = 6 10 disp 8.554935e-12 2.042810e-14 8.540724e-12 8.497488e-12 8.583959e-12
11: cyl = 6 11 disp 8.554935e-12 2.042810e-14 8.540724e-12 8.497488e-12 8.583959e-12
12: cyl = 6 2 disp 8.526513e-12 1.275000e-01 8.540724e-12 8.465837e-12 8.615610e-12
13: Full sample 1 disp 1.202142e+01 -3.645965e-01 -1.538589e+01 -2.786976e+01 -2.902013e+00
23: Full sample 9 disp 1.108624e+01 4.346205e-01 1.834088e+01 4.748985e+00 3.193278e+01
24: Full sample 8 disp 5.716882e+01 1.066898e+00 4.502284e+01 1.904455e+01 7.100112e+01
25: cyl = 4 19 mpg -8.817797e-01 -3.726589e-01 1.349912e+00 -1.675924e+00 4.375747e+00
31: cyl = 4 9 mpg -6.758828e-01 4.627560e-01 -1.676277e+00 -5.002769e+00 1.650214e+00
32: cyl = 4 8 mpg -5.066455e+00 1.039647e+00 -3.765994e+00 -9.515585e+00 1.983596e+00
33: cyl = 6 10 mpg 7.000000e-01 2.042810e-14 1.477903e-12 -8.894343e+00 8.894343e+00
34: cyl = 6 11 mpg -7.000000e-01 2.042810e-14 1.477903e-12 -8.894343e+00 8.894343e+00
35: cyl = 6 2 mpg 8.668621e-13 1.275000e-01 8.668021e-13 -1.257850e+01 1.257850e+01
36: Full sample 3 mpg -1.091027e+00 -3.594840e-01 1.343803e+00 -8.147531e-01 3.502358e+00
37: Full sample 20 mpg 4.979079e+00 -3.419456e-01 1.283776e+00 -8.296313e-01 3.397184e+00
sample idx var y_resid x_resid fit lwr upr