Using stargazer with Zelig

前端 未结 1 630
谎友^
谎友^ 2021-01-14 15:38

I am trying to use stargazer (Version 5.2) to output the standard summary() results of a regression estimated with Zelig (Version 5.0.13). However, I obtain the error

<
1条回答
  •  孤城傲影
    2021-01-14 15:53

    As of Zelig 5.0-13 and stargazer 5.2, stargazer doesn't seem to be able to handle Zelig's internal model. As a workaround, you can simply cast it to a "normal" lm to make it work:

    stargazer(lm(z$zelig.out$z.out[[1]]), type='text')
    

    Result:

    ===============================================
                            Dependent variable:    
                        ---------------------------
                                 Fertility         
    -----------------------------------------------
    Education                    -0.862***         
                                  (0.145)          
    
    Constant                     79.610***         
                                  (2.104)          
    
    -----------------------------------------------
    Observations                    47             
    R2                             0.441           
    Adjusted R2                    0.428           
    Residual Std. Error       9.446 (df = 45)      
    F Statistic           35.446*** (df = 1; 45)   
    ===============================================
    Note:               *p<0.1; **p<0.05; ***p<0.01 
    

    0 讨论(0)
提交回复
热议问题