#StackBounty: #r #regression #logistic #goodness-of-fit #instrumental-variables How can I get goodness-of-fit measures for "ivglm&…

Bounty: 50

I am trying to get the goodness-of-fit measures, such as R-square, chi-square, etc. from the “ivglm” code in the “ivtools” package in R programming.

However, I could not find a way to get these from its output.

For your reference, I also have different number of missing values for each variable as well.

For instance, I run the following code and get the output.

    reg_X.LZ=glm(reg[,5]+reg[,3]+reg[,6]~reg[,14]+reg[,25]+reg[,15]+reg[,46], data=reg)
    reg_Y.LX=glm(reg[,8]~reg[,5]+reg[,7]+reg[,6]+reg[,3]+reg[,4]+reg[,9]+reg[,10]*reg[,13]+reg[,11]+reg[,12]+reg[,14], data=reg, family=binomial(link="logit"))
    reg_logit=ivglm(estmethod="ts", fitX.LZ=reg_X.LZ, fitY.LX=reg_Y.LX, data=reg, family=binomial(link="logit")) 

    > summary(reg_logit)

    Call:  
    ivglm(estmethod = "ts", fitX.LZ = reg_X.LZ, fitY.LX = reg_Y.LX, 
        data = reg, family = binomial(link = "logit"))

    Coefficients: 
                             Estimate   Std. Error z value Pr(>|z|)    
    (Intercept)              2.582e+00  1.673e+00   1.543 0.122738    
    reg[, 5]                -7.177e-02  4.150e-03 -17.293  < 2e-16 ***
    reg[, 7]                 1.666e+00  1.163e-01  14.331  < 2e-16 ***
    reg[, 6]                -1.339e-01  2.393e-02  -5.596 2.19e-08 ***
    reg[, 3]                -1.678e-04  2.763e-05  -6.075 1.24e-09 ***
    reg[, 4]                 1.016e-01  3.873e-03  26.235  < 2e-16 ***
    reg[, 9]                 2.169e-02  6.504e-03   3.335 0.000854 ***
    reg[, 10]               -2.127e-01  1.870e-01  -1.137 0.255463    
    reg[, 13]               -4.391e+00  1.899e+00  -2.313 0.020721 *  
    reg[, 11]                4.420e-02  1.112e-02   3.976 7.01e-05 ***
    reg[, 12]                3.070e-01  6.807e-02   4.510 6.48e-06 ***
    reg[, 14]                1.919e-01  7.351e-02   2.610 0.009046 ** 
    reg[, 10]:reg[, 13]      4.545e-01  2.138e-01   2.126 0.033488 *  
    ---
    Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.