RegressionTables.jl icon indicating copy to clipboard operation
RegressionTables.jl copied to clipboard

Improvements for grouping

Open greimel opened this issue 5 years ago • 1 comments
trafficstars

In #61, I implemented grouping of regressions.

However, I am not yet satisfied with the following behavior


------------------------------------------------------------------------
                         grp1               looooooooooooooooogong grp2 
               ------------------------   ------------------------------
               SepalLength   SepalWidth   SepalLength      SepalWidth   
               -----------   ----------   -----------   ----------------
                       (1)          (2)           (3)                (4)
------------------------------------------------------------------------
(Intercept)       6.526***                                              
                   (0.479)                                              
SepalWidth          -0.223                   0.432***                   
                   (0.155)                    (0.081)                   
SepalLength                      -0.313                         0.378***
                                (0.239)                          (0.066)
PetalLength                     1.048**      0.776***            -0.188*
                                (0.362)       (0.064)            (0.083)
PetalWidth                                                      0.626***
                                                                 (0.123)
------------------------------------------------------------------------
SpeciesDummy                        Yes           Yes                Yes
------------------------------------------------------------------------
Estimator              OLS           IV           OLS                OLS
------------------------------------------------------------------------
N                      150          150           150                150
R2                   0.014        0.080         0.863              0.635
------------------------------------------------------------------------

(columns 3 and 4 should have the same widths)


------------------------------------------------------------
                        grp1                    grp2        
               ---------------------   ---------------------
               SepalWidth       SepalLength       SepalWidth
               ----------   -------------------   ----------
                      (1)        (2)        (3)          (4)
------------------------------------------------------------
SepalLength        -0.313                           0.378***
                  (0.239)                            (0.066)
PetalLength       1.048**              0.776***      -0.188*
                  (0.362)               (0.064)      (0.083)
(Intercept)                 6.526***                        
                             (0.479)                        
SepalWidth                    -0.223   0.432***             
                             (0.155)    (0.081)             
PetalWidth                                          0.626***
                                                     (0.123)
------------------------------------------------------------
SpeciesDummy          Yes                   Yes          Yes
------------------------------------------------------------
Estimator              IV        OLS        OLS          OLS
------------------------------------------------------------
N                     150        150        150          150
R2                  0.080      0.014      0.863        0.635
------------------------------------------------------------

(the SepalLength label should be split and show up in each group once)

The current behaviour is tested in ftest8.txt and ftest9.txt. The tests should be adjusted once this issue is fixed.

greimel avatar Apr 19 '20 12:04 greimel

Doesn't look so bad to me. LaTeX does something similar.

jmboehm avatar Apr 19 '20 19:04 jmboehm