jacob-long / jtools

Tools for summarizing/visualizing regressions and other helpful stuff
https://jtools.jacob-long.com
GNU General Public License v3.0
165 stars 22 forks source link

panelR summary and tables #67

Closed ghost closed 5 years ago

ghost commented 5 years ago

I tried to create tables from models generated through the package panelR and it did not work.

Is there plans to integrate this package with the panelR in order to generate regression tables?

Thank you in advance

jacob-long commented 5 years ago

It's not perfectly seamless, but jacob-long/panelr@77275a0 will at least make things workable.

library(panelr)
library(jtools)

data("WageData")
wages <- panel_data(WageData, id = id, wave = t)
model <- wbm(lwage ~ lag(union) + wks | blk + fem, data = wages)
export_summs(model)
───────────────────────────────────────────────
                               Model 1         
                      ─────────────────────────
  (Intercept)                        6.60 ***  
                                    (0.23)     
  `imean(lag(union))`               -0.03      
                                    (0.03)     
  `imean(wks)`                       0.00      
                                    (0.00)     
  `lag(union)`                       0.05 *    
                                    (0.03)     
  wks                               -0.00      
                                    (0.00)     
  blk                               -0.23 ***  
                                    (0.06)     
  fem                               -0.44 ***  
                                    (0.05)     
                      ─────────────────────────
  nobs                            3570         
  min_wave                           2.00      
  max_wave                           7.00      
  N                                595.00      
  aic                             1383.03      
  bic                             1438.65      
  pR2_fe                             0.13      
  pR2_total                          0.74      
  model                 within-between         
───────────────────────────────────────────────
  *** p < 0.001; ** p < 0.01; * p < 0.05.      

Column names: names, Model 1