#rm(list = ls())
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 
#set directory to source file
list.files()
library(spatialreg)
library(spdep)
#sourcing files for data and functions - takes a bit of time
source("Create_Dat3_final1.R")
source("Funciones.R")
#----------------------------------------------------------------------------------
names(datk)
#-------------------------------------------
# Function to run sub-samples
# Arguments:  var.sub - the discrete variable along which sub-samples are created
#             formula - the formula to run on the sub-sample; defaults to fml.1
# This function only prints out output

ssregs=function(var.sub,formula=fml.1){
  u.var = unique(var.sub)
  for (l in 1:length(u.var)) {
    cat("Sub-sample is ",u.var[l]," \n")
    id = which(var.sub==u.var[l])
    Modl = regf2(formula = formula,subsamp = id) #use sub-sample
    summary.g2sls(Modl,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
    cat(rep("=",45)); cat("\n")
  }#end for l
}

#=====================================================================================>
#********* Begin Printing out output to file
Out_log <- file("Out_log3_final1.txt") # File name of output log

sink(Out_log, append = TRUE, type = "output") # Writing console output to log file
sink(Out_log, append = TRUE, type = "message")

cat(readChar(rstudioapi::getSourceEditorContext()$path, # Writing currently opened R script to file
             file.info(rstudioapi::getSourceEditorContext()$path)$size))
#=====================================================================================>



#----------------------------------------------------------------------------------
cat("\n")
cat("Full Sample - Results","\n")
fml.1 = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+female+
                         hprim+hmid+hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+
                         trd+as.factor(EcZone)+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))
Mod.1 = regf2(formula = fml.1) #use full sample
summary.g2sls(Mod.1,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
cat(rep("=",45)); cat("\n")
#----------------------------------------------------------------------------------
# Exclude religious dummies
cat("\n")
cat("Full Sample - Results with religious dummies excluded","\n")
fml.2 = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+female+
                         hprim+hmid+hpmid+hwrk+rlh+hhsize+mih+fih+
                         as.factor(EcZone)+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))
Mod.2 = regf2(formula = fml.2) #use full sample
summary.g2sls(Mod.2,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
cat(rep("=",45)); cat("\n")
#----------------------------------------------------------------------------------
# Exclude household characteristics
cat("\n")
cat("Full Sample - Results with household characteristics excluded","\n")
fml.3 = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+female+chr+mos+
                         trd+as.factor(EcZone)+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))
Mod.3 = regf2(formula = fml.3) #use full sample
summary.g2sls(Mod.3,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
cat(rep("=",45)); cat("\n")
#----------------------------------------------------------------------------------
# Exclude Ecological Zone dummies
cat("\n")
cat("Full Sample - Results with Ecological Zone dummies excluded","\n")
fml.4 = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+female+hprim+hmid+
                         hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+trd+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))
Mod.4 = regf2(formula = fml.4) #use full sample
summary.g2sls(Mod.4,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
cat(rep("=",45)); cat("\n")
#----------------------------------------------------------------------------------
# Exclude Regional dummies
cat("\n")
cat("Full Sample - Results with Regional dummies excluded","\n")
fml.5 = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+female+hprim+hmid+
                         hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+trd+as.factor(EcZone)+as.factor(mdate)*as.factor(ydate)"))
Mod.5 = regf2(formula = fml.5) #use full sample
summary.g2sls(Mod.5,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
cat(rep("=",45)); cat("\n")
#----------------------------------------------------------------------------------
# Exclude age and age squared
cat("\n")
cat("Full Sample - Results with age variables excluded","\n")
fml.8 = as.formula(paste("wrk~pv2+rural1+emp+sinsch+female+hprim+hmid+hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+trd+as.factor(EcZone)+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))
Mod.8 = regf2(formula = fml.8) #use full sample
summary.g2sls(Mod.8,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
cat(rep("=",45)); cat("\n")
#----------------------------------------------------------------------------------
# Include Month x Rural interaction
cat("\n")
cat("Full Sample - Results with age variables excluded","\n")
fml.9 = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+female+
                         hprim+hmid+hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+
                         trd+as.factor(EcZone)+as.factor(region)+as.factor(mdate)*as.factor(rural1)"))
Mod.9 = regf2(formula = fml.9) #use full sample
summary.g2sls(Mod.9,marg_effect=FALSE,bet.id=3,L=1000,cl=5)
#Test of the impact of seasonality on Child labour in rural and urban areas
aod::wald.test(Sigma = Mod.9$vcovHC,b=Mod.9$coefficients,Terms = 43:52)
cat(rep("=",45)); cat("\n")
#----------------------------------------------------------------------------------



#----------------------------------------------------------------------------------
# Formulae for sub-groups to study - Ecological Zones, Sex, Rural/Urban, Regions
fml.EcZone = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+female+hprim+hmid+hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+trd+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))
fml.sex = as.formula(paste("wrk~pv2+rural1+emp+sinsch+s1q5y+I(s1q5y^2)+hprim+hmid+hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+
                           trd+as.factor(EcZone)+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))
fml.rural = as.formula(paste("wrk~pv2+emp+sinsch+s1q5y+I(s1q5y^2)+female+hprim+hmid+hpmid+hwrk+rlh+hhsize+mih+fih+chr+mos+
                             trd+as.factor(EcZone)+as.factor(region)+as.factor(mdate)*as.factor(ydate)"))

# ------------- Ecological Zones ------------- 
cat("\n")
cat("Sub Sample Results by Ecological Zone","\n")
ssregs(var.sub=datk$EcZone,formula=fml.EcZone)

# ------------- Sex ------------- 
cat("\n")
cat("Sub Sample Results by Sex","\n")
ssregs(var.sub=datk$sex,formula=fml.sex)

# ------------- Rural/Urban ------------- 
cat("\n")
cat("Sub Sample Results by Rural/Urban (1/0)","\n")
ssregs(var.sub=datk$rural1,formula=fml.rural)
#----------------------------------------------------------------------------------


#=====================================================================================>
# Closing Log File
closeAllConnections() # Close connection to log file
#=====================================================================================>

Full Sample - Results 
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC   t value HC  Pr(>|t|) HC
(Intercept)                             -0.4754768465  0.0928714782  -5.11972950 3.059742e-07
rho                                      0.7128246077  0.0395987403  18.00119403 0.000000e+00
pv2                                      0.0079162634  0.0057377854   1.37967226 1.676876e-01
rural1                                   0.0271493627  0.0068974146   3.93616514 8.279401e-05
emp                                      0.2032494220  0.0343184291   5.92245704 3.171667e-09
sinsch                                  -0.0966998058  0.0224802700  -4.30154112 1.696143e-05
s1q5y                                    0.0728719675  0.0041610505  17.51287744 0.000000e+00
I(s1q5y^2)                              -0.0021815301  0.0001950694 -11.18335551 0.000000e+00
female                                  -0.0058034211  0.0046021203  -1.26103203 2.072973e-01
hprim                                   -0.0277098215  0.0094808350  -2.92271951 3.469889e-03
hmid                                    -0.0287649673  0.0063592627  -4.52331797 6.087768e-06
hpmid                                   -0.0562293505  0.0077950866  -7.21343496 5.455636e-13
hwrk                                     0.0550560119  0.0071189723   7.73370224 1.043610e-14
rlh                                     -0.0069679170  0.0097006914  -0.71829076 4.725780e-01
hhsize                                   0.0016912611  0.0008548135   1.97851470 4.787067e-02
mih                                     -0.0008353722  0.0082719033  -0.10098912 9.195591e-01
fih                                      0.0038506802  0.0069154967   0.55681903 5.776511e-01
chr                                     -0.0027718858  0.0147236015  -0.18826140 8.506717e-01
mos                                     -0.0105278760  0.0153264792  -0.68690766 4.921409e-01
trd                                      0.0632053667  0.0190160761   3.32378596 8.880433e-04
as.factor(EcZone)Forest                 -0.0054940007  0.0081174492  -0.67681368 4.985242e-01
as.factor(EcZone)Savannah                0.0025373008  0.0140443380   0.18066361 8.566316e-01
as.factor(region)Brong Ahafo             0.0293059208  0.0142326343   2.05906511 3.948800e-02
as.factor(region)Central                -0.0176861172  0.0104593476  -1.69093885 9.084848e-02
as.factor(region)Eastern                 0.0251913535  0.0113029375   2.22874394 2.583095e-02
as.factor(region)Greater Accra          -0.0044041276  0.0122544620  -0.35938972 7.193036e-01
as.factor(region)Northern               -0.0116138903  0.0164208245  -0.70726596 4.794012e-01
as.factor(region)Upper East              0.0537996565  0.0177401158   3.03265531 2.424123e-03
as.factor(region)Upper West              0.0336432146  0.0170460407   1.97366739 4.841958e-02
as.factor(region)Volta                  -0.0055172142  0.0114351447  -0.48247874 6.294659e-01
as.factor(region)Western                -0.0023728410  0.0110924526  -0.21391491 8.306134e-01
as.factor(mdate)2                       -0.0018814536  0.0096477354  -0.19501505 8.453812e-01
as.factor(mdate)3                       -0.0048295405  0.0098742641  -0.48910384 6.247682e-01
as.factor(mdate)4                        0.0181274411  0.0102280755   1.77232180 7.634115e-02
as.factor(mdate)5                       -0.0006548147  0.0100830981  -0.06494182 9.482203e-01
as.factor(mdate)6                        0.2997899379  0.0651273387   4.60313508 4.161781e-06
as.factor(mdate)7                        0.0121811130  0.0103979334   1.17149366 2.414004e-01
as.factor(mdate)8                        0.0218310728  0.0111441688   1.95896825 5.011651e-02
as.factor(mdate)9                        0.0030719798  0.0107800792   0.28496820 7.756685e-01
as.factor(mdate)10                      -0.0818577997  0.0838601499  -0.97612274 3.290036e-01
as.factor(mdate)11                      -0.0838605936  0.0838271382  -1.00039910 3.171174e-01
as.factor(mdate)12                      -0.0919432893  0.0638020559  -1.44107095 1.495646e-01
as.factor(ydate)2013                    -0.0844751438  0.0831089463  -1.01643863 3.094206e-01
as.factor(mdate)10:as.factor(ydate)2013 -0.0538146773  0.1744967973  -0.30839923 7.577786e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.7299 -0.4115 -0.1863  0.4368  1.4206 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.47548    0.06609  -7.195 6.46e-13 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.507 on 21139 degrees of freedom
Multiple R-Squared: 0.8742,	Adjusted R-squared: 0.874 
Wald test:  2714 on 43 and 21139 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Full Sample - Results with religious dummies excluded 
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC   t value HC  Pr(>|t|) HC
(Intercept)                             -0.4748774062  0.0917838114  -5.17386889 2.292958e-07
rho                                      0.7633751817  0.0400349068  19.06773970 0.000000e+00
pv2                                      0.0079647009  0.0057469897   1.38589094 1.657802e-01
rural1                                   0.0260138311  0.0069593249   3.73798201 1.855032e-04
emp                                      0.1641467348  0.0345211550   4.75496068 1.984850e-06
sinsch                                  -0.0864032815  0.0224862105  -3.84250078 1.217870e-04
s1q5y                                    0.0742513545  0.0041646592  17.82891508 0.000000e+00
I(s1q5y^2)                              -0.0023300172  0.0001952277 -11.93487287 0.000000e+00
female                                  -0.0055587372  0.0046069764  -1.20659119 2.275896e-01
hprim                                   -0.0251217879  0.0094781713  -2.65048891 8.037537e-03
hmid                                    -0.0272528291  0.0062743266  -4.34354648 1.402008e-05
hpmid                                   -0.0523162124  0.0076311566  -6.85560728 7.100986e-12
hwrk                                     0.0546648030  0.0071241715   7.67314527 1.687539e-14
rlh                                     -0.0078364819  0.0097003481  -0.80785574 4.191736e-01
hhsize                                   0.0019314060  0.0008523202   2.26605673 2.344791e-02
mih                                     -0.0030967072  0.0082651499  -0.37467043 7.079056e-01
fih                                      0.0068010983  0.0069042217   0.98506371 3.245928e-01
as.factor(EcZone)Forest                 -0.0077984574  0.0081223054  -0.96012856 3.369905e-01
as.factor(EcZone)Savannah                0.0035549320  0.0140472903   0.25306888 8.002150e-01
as.factor(region)Brong Ahafo             0.0273596576  0.0142656158   1.91787428 5.512695e-02
as.factor(region)Central                -0.0120276045  0.0104904007  -1.14653432 2.515741e-01
as.factor(region)Eastern                 0.0264123059  0.0113474671   2.32759484 1.993363e-02
as.factor(region)Greater Accra          -0.0054639008  0.0122729062  -0.44520024 6.561751e-01
as.factor(region)Northern               -0.0215255265  0.0162760792  -1.32252530 1.859933e-01
as.factor(region)Upper East              0.0368119086  0.0176813858   2.08195834 3.734628e-02
as.factor(region)Upper West              0.0199132292  0.0169642809   1.17383279 2.404620e-01
as.factor(region)Volta                  -0.0092155306  0.0114480311  -0.80498826 4.208265e-01
as.factor(region)Western                -0.0009801994  0.0111037697  -0.08827627 9.296571e-01
as.factor(mdate)2                        0.0014051957  0.0096773362   0.14520481 8.845492e-01
as.factor(mdate)3                       -0.0032451864  0.0098990814  -0.32782702 7.430425e-01
as.factor(mdate)4                        0.0215942516  0.0102290429   2.11107254 3.476608e-02
as.factor(mdate)5                        0.0071537565  0.0101118504   0.70746265 4.792790e-01
as.factor(mdate)6                        0.2860971687  0.0653186174   4.38002487 1.186658e-05
as.factor(mdate)7                        0.0095749673  0.0104108063   0.91971428 3.577221e-01
as.factor(mdate)8                        0.0247558334  0.0111698196   2.21631453 2.666997e-02
as.factor(mdate)9                        0.0097504002  0.0108010884   0.90272385 3.666725e-01
as.factor(mdate)10                      -0.0764410849  0.0837170593  -0.91308851 3.611960e-01
as.factor(mdate)11                      -0.0753678541  0.0836821797  -0.90064401 3.677776e-01
as.factor(mdate)12                      -0.0831434624  0.0636071038  -1.30714114 1.911648e-01
as.factor(ydate)2013                    -0.0781977550  0.0829666002  -0.94252090 3.459260e-01
as.factor(mdate)10:as.factor(ydate)2013 -0.0617344759  0.1741348114  -0.35452116 7.229483e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.5176 -0.3982 -0.1639  0.4126  1.4553 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.47488    0.06784      -7 2.64e-12 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5027 on 21142 degrees of freedom
Multiple R-Squared: 0.8589,	Adjusted R-squared: 0.8586 
Wald test:  2498 on 40 and 21142 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Full Sample - Results with household characteristics excluded 
Printing heteroskedasticity-consistent results...  
                                           Estimates Std. Error HC t value HC  Pr(>|t|) HC
(Intercept)                             -0.521254169  0.0918222053 -5.6767768 1.372563e-08
rho                                      0.474556649  0.0586675331  8.0889143 6.661338e-16
pv2                                      0.019685956  0.0059394145  3.3144607 9.182008e-04
rural1                                   0.054580400  0.0084081878  6.4913394 8.507661e-11
emp                                      0.372272662  0.0473877068  7.8558911 3.996803e-15
sinsch                                  -0.098623099  0.0228579782 -4.3146029 1.598900e-05
s1q5y                                    0.061166676  0.0042464986 14.4040259 0.000000e+00
I(s1q5y^2)                              -0.001618405  0.0001997173 -8.1034811 4.440892e-16
female                                  -0.008829963  0.0047475397 -1.8599030 6.289925e-02
chr                                     -0.011838012  0.0151418003 -0.7818101 4.343262e-01
mos                                     -0.011881194  0.0158428605 -0.7499400 4.532909e-01
trd                                      0.051540790  0.0413182733  1.2474091 2.122475e-01
as.factor(EcZone)Forest                  0.001256549  0.0084135920  0.1493475 8.812795e-01
as.factor(EcZone)Savannah                0.018225136  0.0145958538  1.2486516 2.117925e-01
as.factor(region)Brong Ahafo             0.052581482  0.0153606475  3.4231293 6.190462e-04
as.factor(region)Central                -0.027808916  0.0114276439 -2.4334777 1.495456e-02
as.factor(region)Eastern                 0.039969148  0.0122051454  3.2747785 1.057449e-03
as.factor(region)Greater Accra          -0.014771191  0.0128759415 -1.1471931 2.513018e-01
as.factor(region)Northern               -0.018335818  0.0169873931 -1.0793780 2.804193e-01
as.factor(region)Upper East              0.078579674  0.0191890012  4.0950372 4.221006e-05
as.factor(region)Upper West              0.054655053  0.0181423091  3.0125743 2.590420e-03
as.factor(region)Volta                  -0.008400853  0.0117796981 -0.7131637 4.757444e-01
as.factor(region)Western                -0.008981863  0.0113673299 -0.7901472 4.294418e-01
as.factor(mdate)2                        0.006092446  0.0100034218  0.6090362 5.425004e-01
as.factor(mdate)3                       -0.005600405  0.0102782848 -0.5448774 5.858378e-01
as.factor(mdate)4                        0.031116716  0.0108310862  2.8729082 4.067123e-03
as.factor(mdate)5                        0.016590889  0.0104652902  1.5853253 1.128925e-01
as.factor(mdate)6                        0.422736826  0.0762372598  5.5450160 2.939273e-08
as.factor(mdate)7                        0.027183138  0.0109512913  2.4821856 1.305792e-02
as.factor(mdate)8                        0.044710458  0.0118984606  3.7576675 1.715046e-04
as.factor(mdate)9                        0.011843276  0.0111578846  1.0614266 2.884961e-01
as.factor(mdate)10                      -0.042877644  0.0798395733 -0.5370475 5.912348e-01
as.factor(mdate)11                      -0.050161613  0.0797802267 -0.6287474 5.295144e-01
as.factor(mdate)12                      -0.076288863  0.0586719194 -1.3002619 1.935112e-01
as.factor(ydate)2013                    -0.059584990  0.0789727585 -0.7545006 4.505487e-01
as.factor(mdate)10:as.factor(ydate)2013 -0.089840441  0.1701729432 -0.5279361 5.975437e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-0.8960 -0.4277 -0.2212  0.5630  1.0422 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.52125    0.04227  -12.33   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5231 on 21147 degrees of freedom
Multiple R-Squared: 0.6336,	Adjusted R-squared: 0.633 
Wald test:   729 on 35 and 21147 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Full Sample - Results with Ecological Zone dummies excluded 
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC   t value HC  Pr(>|t|) HC
(Intercept)                             -0.4700365352  0.0928568811  -5.06194619 4.149982e-07
rho                                      0.7373593651  0.0397388505  18.55512566 0.000000e+00
pv2                                      0.0065460845  0.0057415496   1.14012504 2.542342e-01
rural1                                   0.0254467761  0.0069041417   3.68572623 2.280514e-04
emp                                      0.1816081134  0.0345038833   5.26341083 1.414071e-07
sinsch                                  -0.0900958577  0.0224793706  -4.00793507 6.125195e-05
s1q5y                                    0.0728838518  0.0041616506  17.51320796 0.000000e+00
I(s1q5y^2)                              -0.0022294354  0.0001950972 -11.42730820 0.000000e+00
female                                  -0.0059164859  0.0046030006  -1.28535415 1.986686e-01
hprim                                   -0.0229158377  0.0094561648  -2.42337546 1.537702e-02
hmid                                    -0.0321339149  0.0063436434  -5.06552984 4.072660e-07
hpmid                                   -0.0575920189  0.0077796444  -7.40291153 1.332268e-13
hwrk                                     0.0560535579  0.0071152820   7.87791091 3.330669e-15
rlh                                     -0.0073677931  0.0096989619  -0.75964760 4.474653e-01
hhsize                                   0.0017811484  0.0008542290   2.08509473 3.706070e-02
mih                                     -0.0028943985  0.0082725723  -0.34987891 7.264296e-01
fih                                      0.0061777502  0.0069180965   0.89298410 3.718657e-01
chr                                     -0.0032146224  0.0147290009  -0.21825122 8.272334e-01
mos                                     -0.0099195592  0.0153270681  -0.64719222 5.175075e-01
trd                                      0.0611305220  0.0187289807   3.26395350 1.098692e-03
as.factor(region)Brong Ahafo             0.0332950296  0.0120247179   2.76888238 5.624894e-03
as.factor(region)Central                -0.0125020676  0.0097915432  -1.27682301 2.016647e-01
as.factor(region)Eastern                 0.0259868987  0.0113039298   2.29892606 2.150914e-02
as.factor(region)Greater Accra           0.0005260710  0.0095463201   0.05510720 9.560531e-01
as.factor(region)Northern               -0.0074723306  0.0111161325  -0.67220597 5.014526e-01
as.factor(region)Upper East              0.0551627112  0.0131027672   4.21000468 2.553654e-05
as.factor(region)Upper West              0.0376763801  0.0121788704   3.09358575 1.977534e-03
as.factor(region)Volta                   0.0026053585  0.0105363625   0.24727305 8.046969e-01
as.factor(region)Western                 0.0004108460  0.0103233656   0.03979768 9.682544e-01
as.factor(mdate)2                        0.0002680371  0.0096357866   0.02781683 9.778082e-01
as.factor(mdate)3                        0.0010221799  0.0098683722   0.10358141 9.175015e-01
as.factor(mdate)4                        0.0213482649  0.0102251836   2.08781238 3.681476e-02
as.factor(mdate)5                        0.0125908162  0.0100806342   1.24901032 2.116613e-01
as.factor(mdate)6                        0.2977106721  0.0654241289   4.55047208 5.352569e-06
as.factor(mdate)7                        0.0147818102  0.0103883095   1.42292739 1.547572e-01
as.factor(mdate)8                        0.0287172874  0.0111348387   2.57904835 9.907292e-03
as.factor(mdate)9                        0.0123420206  0.0107806901   1.14482658 2.522810e-01
as.factor(mdate)10                      -0.0805467677  0.0841388211  -0.95730801 3.384118e-01
as.factor(mdate)11                      -0.0859468060  0.0841193694  -1.02172433 3.069114e-01
as.factor(mdate)12                      -0.0839819703  0.0640991986  -1.31018752 1.901324e-01
as.factor(ydate)2013                    -0.0887635821  0.0834025198  -1.06427938 2.872022e-01
as.factor(mdate)10:as.factor(ydate)2013 -0.0459356687  0.1746231687  -0.26305598 7.925074e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.4429 -0.4030 -0.1725  0.4257  1.0561 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.47004    0.06521  -7.208 5.85e-13 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5044 on 21141 degrees of freedom
Multiple R-Squared: 0.845,	Adjusted R-squared: 0.8447 
Wald test:  2135 on 41 and 21141 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Full Sample - Results with Regional dummies excluded 
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC   t value HC  Pr(>|t|) HC
(Intercept)                             -0.5149336205  0.0927177127  -5.55377830 2.795600e-08
rho                                      0.7734413494  0.0353855126  21.85757087 0.000000e+00
pv2                                      0.0045400749  0.0056968562   0.79694391 4.254836e-01
rural1                                   0.0245685553  0.0065412184   3.75596008 1.726782e-04
emp                                      0.1617196049  0.0314105908   5.14856934 2.624807e-07
sinsch                                  -0.0863241442  0.0226813156  -3.80595843 1.412561e-04
s1q5y                                    0.0797784109  0.0041556623  19.19751998 0.000000e+00
I(s1q5y^2)                              -0.0025318675  0.0001949187 -12.98935289 0.000000e+00
female                                  -0.0058274529  0.0045895984  -1.26970869 2.041884e-01
hprim                                   -0.0304830824  0.0094399013  -3.22917383 1.241484e-03
hmid                                    -0.0338588673  0.0062653591  -5.40413834 6.512067e-08
hpmid                                   -0.0551409069  0.0076696334  -7.18951013 6.501466e-13
hwrk                                     0.0563853143  0.0071110911   7.92920718 2.220446e-15
rlh                                     -0.0033097675  0.0096693490  -0.34229476 7.321291e-01
hhsize                                   0.0014878735  0.0008338651   1.78430954 7.437338e-02
mih                                     -0.0032384578  0.0082334491  -0.39332942 6.940762e-01
fih                                      0.0034817178  0.0068860896   0.50561610 6.131262e-01
chr                                     -0.0019542119  0.0146786716  -0.13313275 8.940884e-01
mos                                     -0.0117089907  0.0152765408  -0.76646872 4.433975e-01
trd                                      0.0176520834  0.0199589168   0.88442091 3.764690e-01
as.factor(EcZone)Forest                  0.0084105250  0.0064160363   1.31085996 1.899051e-01
as.factor(EcZone)Savannah                0.0266468288  0.0088011715   3.02764567 2.464669e-03
as.factor(mdate)2                       -0.0041686673  0.0096017401  -0.43415748 6.641741e-01
as.factor(mdate)3                       -0.0066237645  0.0098343119  -0.67353614 5.006063e-01
as.factor(mdate)4                        0.0102582923  0.0100240405   1.02336901 3.061334e-01
as.factor(mdate)5                        0.0017157655  0.0100318043   0.17103259 8.641981e-01
as.factor(mdate)6                        0.2644005928  0.0651029453   4.06126929 4.880663e-05
as.factor(mdate)7                        0.0001092925  0.0102459625   0.01066689 9.914892e-01
as.factor(mdate)8                        0.0129811013  0.0107739655   1.20485826 2.282580e-01
as.factor(mdate)9                       -0.0013297721  0.0106868347  -0.12443087 9.009741e-01
as.factor(mdate)10                      -0.0685047367  0.0840233065  -0.81530637 4.148970e-01
as.factor(mdate)11                      -0.0686417429  0.0839976241  -0.81718672 4.138217e-01
as.factor(mdate)12                      -0.0890401633  0.0638823141  -1.39381556 1.633733e-01
as.factor(ydate)2013                    -0.0645694423  0.0832576263  -0.77553787 4.380219e-01
as.factor(mdate)10:as.factor(ydate)2013 -0.0953266676  0.1741398544  -0.54741442 5.840940e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.7510 -0.4062 -0.1754  0.4290  1.0685 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.51493    0.06924  -7.437 1.07e-13 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.504 on 21148 degrees of freedom
Multiple R-Squared: 0.8661,	Adjusted R-squared: 0.8659 
Wald test:  2991 on 34 and 21148 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Full Sample - Results with age variables excluded 
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC  t value HC  Pr(>|t|) HC
(Intercept)                              0.1928802031  0.0962582673  2.00377805 4.509384e-02
rho                                      0.8774470964  0.0481428039 18.22592424 0.000000e+00
pv2                                      0.0049145138  0.0060504523  0.81225561 4.166450e-01
rural1                                   0.0048890068  0.0076098382  0.64245870 5.205754e-01
emp                                      0.0470489785  0.0403317797  1.16654854 2.433927e-01
sinsch                                  -0.1618838850  0.0229981035 -7.03901021 1.936007e-12
female                                  -0.0040629225  0.0048236056 -0.84229990 3.996201e-01
hprim                                   -0.0232728755  0.0099640381 -2.33568711 1.950755e-02
hmid                                    -0.0204769076  0.0067417163 -3.03734341 2.386734e-03
hpmid                                   -0.0327314082  0.0081152359 -4.03332803 5.499243e-05
hwrk                                     0.0367865635  0.0073555931  5.00116892 5.698376e-07
rlh                                      0.0164909713  0.0101896379  1.61840602 1.055751e-01
hhsize                                   0.0020640302  0.0009101258  2.26785162 2.333825e-02
mih                                     -0.0213201164  0.0086178444 -2.47395002 1.336284e-02
fih                                     -0.0106634007  0.0072664866 -1.46747682 1.422464e-01
chr                                      0.0019913345  0.0156899896  0.12691752 8.990057e-01
mos                                     -0.0068804976  0.0163125871 -0.42179070 6.731778e-01
trd                                      0.0062472807  0.0479229255  0.13036100 8.962808e-01
as.factor(EcZone)Forest                 -0.0003061224  0.0082464096 -0.03712190 9.703878e-01
as.factor(EcZone)Savannah               -0.0025168772  0.0150148966 -0.16762534 8.668780e-01
as.factor(region)Brong Ahafo             0.0119049425  0.0154557172  0.77026141 4.411448e-01
as.factor(region)Central                -0.0024163958  0.0108140351 -0.22344997 8.231853e-01
as.factor(region)Eastern                 0.0111253002  0.0121474244  0.91585671 3.597421e-01
as.factor(region)Greater Accra           0.0041261640  0.0123882032  0.33307203 7.390799e-01
as.factor(region)Northern               -0.0075868105  0.0174143000 -0.43566555 6.630794e-01
as.factor(region)Upper East              0.0239431920  0.0192378028  1.24459078 2.132822e-01
as.factor(region)Upper West              0.0133424230  0.0183406358  0.72747876 4.669327e-01
as.factor(region)Volta                   0.0015596571  0.0118697252  0.13139791 8.954605e-01
as.factor(region)Western                -0.0058212516  0.0116728928 -0.49869828 6.179920e-01
as.factor(mdate)2                       -0.0074344834  0.0099096953 -0.75022321 4.531203e-01
as.factor(mdate)3                       -0.0068398868  0.0101352306 -0.67486248 4.997631e-01
as.factor(mdate)4                        0.0032291100  0.0108683661  0.29711090 7.663818e-01
as.factor(mdate)5                       -0.0030721291  0.0105198225 -0.29203241 7.702618e-01
as.factor(mdate)6                        0.2530577284  0.0479041220  5.28258776 1.273718e-07
as.factor(mdate)7                        0.0006220100  0.0109629951  0.05673723 9.547545e-01
as.factor(mdate)8                        0.0065428462  0.0119299752  0.54843754 5.833915e-01
as.factor(mdate)9                       -0.0002249024  0.0112677073 -0.01995990 9.840754e-01
as.factor(mdate)10                      -0.0803297682  0.0893732964 -0.89881174 3.687529e-01
as.factor(mdate)11                      -0.0835706191  0.0892913753 -0.93593159 3.493084e-01
as.factor(mdate)12                      -0.0715339230  0.0727087565 -0.98384192 3.251932e-01
as.factor(ydate)2013                    -0.0758561345  0.0884169417 -0.85793665 3.909274e-01
as.factor(mdate)10:as.factor(ydate)2013 -0.0553272944  0.1849583363 -0.29913382 7.648379e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.98716 -0.38811 -0.08305  0.38948  1.31307 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept)  0.19288    0.07899   2.442   0.0146 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.4941 on 21141 degrees of freedom
Multiple R-Squared: 0.7598,	Adjusted R-squared: 0.7593 
Wald test: 727.2 on 41 and 21141 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Full Sample - Results with age variables excluded 
Printing heteroskedasticity-consistent results...  
                                          Estimates Std. Error HC    t value HC  Pr(>|t|) HC
(Intercept)                           -0.5620018474  0.0403633471 -13.923568988 0.000000e+00
rho                                    0.7647004327  0.0394510796  19.383510944 0.000000e+00
pv2                                    0.0042308537  0.0057276268   0.738674827 4.601045e-01
rural1                                 0.0095133999  0.0140290525   0.678121338 4.976948e-01
emp                                    0.1621612707  0.0341272021   4.751671996 2.017414e-06
sinsch                                -0.0907372325  0.0224043653  -4.049980041 5.122200e-05
s1q5y                                  0.0777559769  0.0041598250  18.692126926 0.000000e+00
I(s1q5y^2)                            -0.0024765735  0.0001949819 -12.701555278 0.000000e+00
female                                -0.0082560024  0.0046012482  -1.794296272 7.276589e-02
hprim                                 -0.0247871300  0.0094916417  -2.611469199 9.015411e-03
hmid                                  -0.0312181006  0.0063566432  -4.911098436 9.056760e-07
hpmid                                 -0.0600237382  0.0077751974  -7.719898958 1.154632e-14
hwrk                                   0.0590298588  0.0071185461   8.292403833 0.000000e+00
rlh                                   -0.0052709619  0.0096950048  -0.543678117 5.866630e-01
hhsize                                 0.0015264723  0.0008545124   1.786366434 7.403995e-02
mih                                   -0.0075612299  0.0082653741  -0.914807941 3.602925e-01
fih                                    0.0070708391  0.0069059540   1.023875791 3.058939e-01
chr                                   -0.0029859508  0.0147480660  -0.202463890 8.395541e-01
mos                                   -0.0090463694  0.0153819428  -0.588116177 5.564543e-01
trd                                    0.0561581393  0.0199620196   2.813249386 4.904360e-03
as.factor(EcZone)Forest               -0.0044205534  0.0082139462  -0.538176564 5.904552e-01
as.factor(EcZone)Savannah              0.0179791555  0.0142066885   1.265541614 2.056772e-01
as.factor(region)Brong Ahafo           0.0193938918  0.0142014267   1.365629820 1.720552e-01
as.factor(region)Central              -0.0131473373  0.0106356892  -1.236152832 2.164018e-01
as.factor(region)Eastern               0.0364973490  0.0114093959   3.198885327 1.379600e-03
as.factor(region)Greater Accra         0.0024373152  0.0123937071   0.196657481 8.440956e-01
as.factor(region)Northern             -0.0236189708  0.0164712378  -1.433952392 1.515858e-01
as.factor(region)Upper East            0.0297630760  0.0177568628   1.676144956 9.370980e-02
as.factor(region)Upper West            0.0186293309  0.0171159970   1.088416350 2.764113e-01
as.factor(region)Volta                -0.0022367524  0.0114732995  -0.194952847 8.454299e-01
as.factor(region)Western               0.0052301769  0.0111329629   0.469792001 6.385036e-01
as.factor(mdate)2                      0.0031793735  0.0142908603   0.222476005 8.239434e-01
as.factor(mdate)3                      0.0099746684  0.0158776536   0.628220553 5.298595e-01
as.factor(mdate)4                      0.0305002095  0.0146431639   2.082897503 3.726057e-02
as.factor(mdate)5                      0.0125448224  0.0138274047   0.907243460 3.642781e-01
as.factor(mdate)6                      0.2973361092  0.0652988118   4.553468909 5.276847e-06
as.factor(mdate)7                     -0.0102281422  0.0147779765  -0.692120615 4.888616e-01
as.factor(mdate)8                      0.0111721357  0.0149152372   0.749041768 4.538320e-01
as.factor(mdate)9                      0.0034563635  0.0148215048   0.233199232 8.156067e-01
as.factor(mdate)10                     0.0130047334  0.0145304538   0.894998431 3.707879e-01
as.factor(mdate)11                    -0.0073538421  0.0131933884  -0.557388437 5.772621e-01
as.factor(mdate)12                     0.0030325813  0.0473196152   0.064087193 9.489008e-01
as.factor(mdate)2:as.factor(rural1)1   0.0091036684  0.0195609681   0.465399688 6.416453e-01
as.factor(mdate)3:as.factor(rural1)1  -0.0001572642  0.0205176866  -0.007664813 9.938844e-01
as.factor(mdate)4:as.factor(rural1)1  -0.0078513522  0.0199927887  -0.392709209 6.945343e-01
as.factor(mdate)5:as.factor(rural1)1   0.0024688899  0.0197754639   0.124846118 9.006454e-01
as.factor(mdate)7:as.factor(rural1)1   0.0486085669  0.0210681608   2.307205045 2.104339e-02
as.factor(mdate)8:as.factor(rural1)1   0.0354106861  0.0210927316   1.678809875 9.318910e-02
as.factor(mdate)9:as.factor(rural1)1   0.0171900473  0.0211563282   0.812525082 4.164904e-01
as.factor(mdate)10:as.factor(rural1)1 -0.0057783115  0.0200491774  -0.288206910 7.731884e-01
as.factor(mdate)11:as.factor(rural1)1  0.0176616567  0.0200696095   0.880019946 3.788485e-01
as.factor(mdate)12:as.factor(rural1)1 -0.0341514742  0.0882470435  -0.386998508 6.987573e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-2.0858 -0.3928 -0.1620  0.4201  1.2223 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.56200    0.01568  -35.84   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5028 on 21131 degrees of freedom
Multiple R-Squared: 0.8178,	Adjusted R-squared: 0.8173 
Wald test:  1326 on 51 and 21131 DF,  p-value: < 2.2e-16 


Wald test:
----------

Chi-squared test:
X2 = 12.9, df = 10, P(> X2) = 0.23
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Sub Sample Results by Ecological Zone 
Sub-sample is  Coastal  
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC  t value HC Pr(>|t|) HC
(Intercept)                             -0.1096253037  0.0954794357 -1.14815617 0.250904098
rho                                      0.8685721564  0.0554689262 15.65871590 0.000000000
pv2                                     -0.0040211297  0.0116902696 -0.34397237 0.730867065
rural1                                   0.0066861921  0.0101097557  0.66136040 0.508381213
emp                                     -0.0020242461  0.0312222585 -0.06483343 0.948306624
sinsch                                   0.0008892762  0.0396221396  0.02244392 0.982093845
s1q5y                                    0.0187463266  0.0069452904  2.69914221 0.006951846
I(s1q5y^2)                              -0.0006078153  0.0003286994 -1.84915223 0.064435834
female                                   0.0030708226  0.0076298899  0.40247272 0.687336157
hprim                                   -0.0147383964  0.0140368189 -1.04998123 0.293726743
hmid                                    -0.0106384798  0.0106273963 -1.00104291 0.316806062
hpmid                                   -0.0235115035  0.0110763483 -2.12267643 0.033780975
hwrk                                     0.0242247194  0.0100143695  2.41899596 0.015563413
rlh                                     -0.0017357367  0.0159977866 -0.10849855 0.913600229
hhsize                                   0.0003619914  0.0020231658  0.17892327 0.857997954
mih                                     -0.0017173893  0.0141733395 -0.12117040 0.903556066
fih                                     -0.0030464912  0.0108282358 -0.28134696 0.778444294
chr                                      0.0165695325  0.0270896806  0.61165478 0.540766189
mos                                      0.0178527884  0.0301918987  0.59131056 0.554312357
as.factor(region)Greater Accra           0.0052829721  0.0087094858  0.60657681 0.544131796
as.factor(region)Volta                   0.0025275164  0.0130421305  0.19379628 0.846335398
as.factor(region)Western                 0.0018774661  0.0108322757  0.17332149 0.862398734
as.factor(mdate)2                       -0.0102103526  0.0159883629 -0.63861151 0.523075690
as.factor(mdate)3                       -0.0076647053  0.0154545132 -0.49595255 0.619927888
as.factor(mdate)4                       -0.0032056620  0.0135340567 -0.23685892 0.812766242
as.factor(mdate)5                       -0.0066144595  0.0135601044 -0.48778824 0.625699842
as.factor(mdate)6                        0.0394015192  0.0204576573  1.92600348 0.054103940
as.factor(mdate)7                       -0.0043153456  0.0152999656 -0.28204937 0.777905657
as.factor(mdate)8                       -0.0018485468  0.0169065263 -0.10933925 0.912933419
as.factor(mdate)9                       -0.0063405292  0.0141863942 -0.44694438 0.654915219
as.factor(mdate)10                      -0.0484764051  0.0707884078 -0.68480711 0.493465647
as.factor(mdate)11                      -0.0451197296  0.0710530348 -0.63501481 0.525418754
as.factor(mdate)12                      -0.0507774039  0.0679817270 -0.74692724 0.455107480
as.factor(ydate)2013                    -0.0417122091  0.0694037972 -0.60100759 0.547834929
as.factor(mdate)10:as.factor(ydate)2013  0.0829125963  0.0706885494  1.17292825 0.240824582

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.89548 -0.13008 -0.04084  0.12920  1.75626 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)  
(Intercept) -0.10963    0.05374   -2.04   0.0414 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3534 on 3904 degrees of freedom
Multiple R-Squared: 0.6615,	Adjusted R-squared: 0.6586 
Wald test: 45.49 on 34 and 3904 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Sub-sample is  Forest  
Printing heteroskedasticity-consistent results...  
                                Estimates Std. Error HC  t value HC  Pr(>|t|) HC
(Intercept)                  -0.541521192  0.0663461527 -8.16205869 2.220446e-16
rho                           0.794534527  0.0583804720 13.60959409 0.000000e+00
pv2                           0.005522768  0.0099170868  0.55689423 5.775997e-01
rural1                        0.007774674  0.0105284421  0.73844488 4.602441e-01
emp                           0.159870109  0.0573748687  2.78641351 5.329484e-03
sinsch                       -0.153275520  0.0342112509 -4.48026645 7.454991e-06
s1q5y                         0.080139968  0.0067491699 11.87404807 0.000000e+00
I(s1q5y^2)                   -0.002641553  0.0003178136 -8.31164291 0.000000e+00
female                        0.002442105  0.0075693990  0.32262865 7.469765e-01
hprim                        -0.021659552  0.0141647024 -1.52912154 1.262343e-01
hmid                         -0.036179907  0.0098070982 -3.68915520 2.249999e-04
hpmid                        -0.063861935  0.0129349931 -4.93714490 7.927457e-07
hwrk                          0.071349944  0.0126201168  5.65366750 1.570599e-08
rlh                          -0.015274937  0.0156622723 -0.97526952 3.294266e-01
hhsize                        0.006005345  0.0016703668  3.59522500 3.241113e-04
mih                          -0.006400128  0.0130924485 -0.48884120 6.249541e-01
fih                           0.024331117  0.0109055717  2.23107213 2.567635e-02
chr                          -0.002141337  0.0258330911 -0.08289124 9.339380e-01
mos                          -0.032673499  0.0281814839 -1.15939598 2.462948e-01
trd                          -0.009659820  0.0301625456 -0.32025877 7.487722e-01
as.factor(region)Brong Ahafo  0.029590528  0.0175024027  1.69065518 9.090268e-02
as.factor(region)Central     -0.003940599  0.0126229717 -0.31217678 7.549062e-01
as.factor(region)Eastern      0.035334275  0.0120600765  2.92985496 3.391202e-03
as.factor(region)Volta        0.006995518  0.0143693006  0.48683778 6.263733e-01
as.factor(region)Western     -0.002075919  0.0126395309 -0.16424020 8.695421e-01
as.factor(mdate)2            -0.002912265  0.0157704315 -0.18466614 8.534909e-01
as.factor(mdate)3            -0.022615929  0.0166935367 -1.35477159 1.754903e-01
as.factor(mdate)4             0.008593588  0.0167340473  0.51353912 6.075743e-01
as.factor(mdate)5             0.004900372  0.0163697751  0.29935486 7.646693e-01
as.factor(mdate)6             0.401151395  0.1198607053  3.34681323 8.174627e-04
as.factor(mdate)7             0.010840589  0.0170294063  0.63658058 5.243981e-01
as.factor(mdate)8             0.009979429  0.0170543719  0.58515373 5.584444e-01
as.factor(mdate)9            -0.003432495  0.0180449629 -0.19021898 8.491375e-01
as.factor(mdate)10           -0.011013272  0.0188633417 -0.58384525 5.593244e-01
as.factor(mdate)11           -0.021033414  0.0180205436 -1.16719087 2.431333e-01
as.factor(mdate)12           -0.054093512  0.0495145251 -1.09247765 2.746232e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.6962 -0.4181 -0.1627  0.4448  1.2072 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.54152    0.03449   -15.7   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.52 on 8501 degrees of freedom
Multiple R-Squared: 0.8383,	Adjusted R-squared: 0.8376 
Wald test:  1054 on 35 and 8501 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Sub-sample is  Savannah  
Printing heteroskedasticity-consistent results...  
                                Estimates Std. Error HC  t value HC  Pr(>|t|) HC
(Intercept)                 -0.4738675010  0.1765558420 -2.68395254 7.275743e-03
rho                          0.8529387749  0.0497602620 17.14096231 0.000000e+00
pv2                          0.0047819685  0.0084670084  0.56477663 5.722257e-01
rural1                       0.0281051701  0.0113839456  2.46884263 1.355508e-02
emp                          0.0980295016  0.0481264711  2.03691439 4.165862e-02
sinsch                      -0.0927168855  0.0397977166 -2.32970364 1.982182e-02
s1q5y                        0.0966047337  0.0068402858 14.12290898 0.000000e+00
I(s1q5y^2)                  -0.0028531272  0.0003193856 -8.93317325 0.000000e+00
female                      -0.0177805754  0.0074547467 -2.38513475 1.707287e-02
hprim                       -0.0472921370  0.0188316585 -2.51131025 1.202839e-02
hmid                        -0.0214096864  0.0119633982 -1.78959908 7.351839e-02
hpmid                       -0.0568014986  0.0145451045 -3.90519701 9.414865e-05
hwrk                         0.0612689585  0.0122616212  4.99680731 5.828726e-07
rlh                          0.0135324842  0.0164179964  0.82424700 4.097992e-01
hhsize                      -0.0006686754  0.0010766354 -0.62107877 5.345478e-01
mih                          0.0043886442  0.0142708839  0.30752434 7.584443e-01
fih                         -0.0163818604  0.0124498405 -1.31582894 1.882315e-01
chr                         -0.0022148142  0.0209027529 -0.10595802 9.156157e-01
mos                          0.0054492293  0.0212336246  0.25663208 7.974628e-01
trd                          0.0512953256  0.0769085433  0.66696525 5.047943e-01
as.factor(region)Northern   -0.0231217182  0.0153612189 -1.50520075 1.322725e-01
as.factor(region)Upper East  0.0008250674  0.0135788105  0.06076139 9.515492e-01
as.factor(region)Upper West -0.0044717144  0.0131026597 -0.34128295 7.328906e-01
as.factor(region)Volta      -0.0165021985  0.0206456664 -0.79930568 4.241132e-01
as.factor(mdate)2            0.0021434980  0.0156734886  0.13675947 8.912209e-01
as.factor(mdate)3            0.0041627800  0.0162217983  0.25661643 7.974749e-01
as.factor(mdate)4            0.0160967242  0.0172270515  0.93438649 3.501046e-01
as.factor(mdate)5           -0.0023055233  0.0172402515 -0.13372910 8.936168e-01
as.factor(mdate)6            0.2092595934  0.0603184034  3.46924955 5.219144e-04
as.factor(mdate)7            0.0018190591  0.0181520605  0.10021227 9.201758e-01
as.factor(mdate)8            0.0237009684  0.0195534918  1.21210926 2.254706e-01
as.factor(mdate)9            0.0116149185  0.0188860691  0.61499926 5.385552e-01
as.factor(mdate)10          -0.1790104360  0.1675778896 -1.06822228 2.854203e-01
as.factor(mdate)11          -0.1911450602  0.1682178728 -1.13629460 2.558333e-01
as.factor(mdate)12          -0.0916354131  0.2127286394 -0.43076199 6.666414e-01
as.factor(ydate)2013        -0.1807593985  0.1673900441 -1.07986947 2.802003e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.0159 -0.4608 -0.1446  0.4785  1.0830 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.47387    0.06259  -7.571 4.08e-14 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5257 on 8671 degrees of freedom
Multiple R-Squared: 0.9511,	Adjusted R-squared: 0.9509 
Wald test:  4290 on 35 and 8671 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Sub Sample Results by Sex 
Sub-sample is  Female  
Printing heteroskedasticity-consistent results...  
                                   Estimates Std. Error HC  t value HC  Pr(>|t|) HC
(Intercept)                    -0.5079635633  0.0823272602 -6.17005305 6.826708e-10
rho                             0.1761447944  0.0748484065  2.35335397 1.860491e-02
pv2                             0.0043046276  0.0131977875  0.32616282 7.443012e-01
rural1                          0.0649734533  0.0142663795  4.55430570 5.255888e-06
emp                             0.4597794453  0.0640767280  7.17545137 7.207568e-13
sinsch                         -0.1831414617  0.0471939982 -3.88060916 1.041952e-04
s1q5y                           0.0571532080  0.0086807737  6.58388414 4.583134e-11
I(s1q5y^2)                     -0.0015765453  0.0004060576 -3.88256600 1.033599e-04
hprim                          -0.0149592836  0.0170902319 -0.87531192 3.814042e-01
hmid                           -0.0009006276  0.0133704623 -0.06735950 9.462955e-01
hpmid                          -0.0798387609  0.0164400301 -4.85636343 1.195612e-06
hwrk                            0.0666537410  0.0112845227  5.90665134 3.491315e-09
rlh                            -0.0234365628  0.0175173203 -1.33790799 1.809264e-01
hhsize                          0.0001356401  0.0024005952  0.05650269 9.549414e-01
mih                             0.0094200647  0.0179695945  0.52422244 6.001238e-01
fih                            -0.0299627774  0.0213876702 -1.40093695 1.612329e-01
chr                             0.0315972825  0.0320889108  0.98467918 3.247817e-01
mos                             0.0097586249  0.0350830050  0.27815818 7.808909e-01
as.factor(EcZone)Forest        -0.0234860518  0.0151202129 -1.55328844 1.203542e-01
as.factor(EcZone)Savannah       0.0115857760  0.0328498036  0.35268935 7.243213e-01
as.factor(region)Brong Ahafo    0.0505211751  0.0275672337  1.83265305 6.685418e-02
as.factor(region)Central       -0.0640145837  0.0210483713 -3.04130817 2.355526e-03
as.factor(region)Eastern        0.0585616237  0.0217383155  2.69393568 7.061379e-03
as.factor(region)Greater Accra -0.0478962417  0.0246064847 -1.94648859 5.159608e-02
as.factor(region)Northern       0.0445870355  0.0432212812  1.03159912 3.022600e-01
as.factor(region)Upper East     0.1054941583  0.0398222052  2.64912899 8.069952e-03
as.factor(region)Upper West     0.1328889509  0.0416458379  3.19092993 1.418157e-03
as.factor(region)Volta         -0.0384504504  0.0227834159 -1.68765081 9.147828e-02
as.factor(region)Western       -0.0236499452  0.0218098970 -1.08436758 2.782019e-01
as.factor(mdate)2              -0.0367807857  0.0227082781 -1.61970826 1.052950e-01
as.factor(mdate)3              -0.0419298930  0.0238002483 -1.76174183 7.811293e-02
as.factor(mdate)4              -0.0191463371  0.0225433364 -0.84931249 3.957074e-01
as.factor(mdate)5              -0.0240121445  0.0238299446 -1.00764584 3.136245e-01
as.factor(mdate)7              -0.0344481392  0.0238562063 -1.44399067 1.487416e-01
as.factor(mdate)8              -0.0067553498  0.0243500750 -0.27742624 7.814528e-01
as.factor(mdate)9              -0.0156499371  0.0244404848 -0.64032843 5.219591e-01
as.factor(mdate)10             -0.0452379838  0.0237971115 -1.90098634 5.730380e-02
as.factor(mdate)11             -0.0455536380  0.0234210879 -1.94498386 5.177692e-02
as.factor(mdate)12              0.0590285858  0.1687042378  0.34989391 7.264183e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-0.8236 -0.3851 -0.2130  0.3961  1.0700 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.50796    0.04513  -11.26   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5215 on 5076 degrees of freedom
Multiple R-Squared: 0.4555,	Adjusted R-squared: 0.4514 
Wald test: 92.11 on 38 and 5076 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Sub-sample is  Male  
Printing heteroskedasticity-consistent results...  
                                           Estimates Std. Error HC  t value HC  Pr(>|t|) HC
(Intercept)                             -0.486029517  0.0947520998  -5.1294854 2.905352e-07
rho                                      0.794190005  0.0412252140  19.2646666 0.000000e+00
pv2                                      0.007063646  0.0065108901   1.0848971 2.779672e-01
rural1                                   0.017623553  0.0077421835   2.2763027 2.282790e-02
emp                                      0.149328590  0.0369664359   4.0395723 5.354876e-05
sinsch                                  -0.062095867  0.0258101795  -2.4058673 1.613412e-02
s1q5y                                    0.073176249  0.0048077701  15.2204136 0.000000e+00
I(s1q5y^2)                              -0.002318189  0.0002257371 -10.2694209 0.000000e+00
hprim                                   -0.038726616  0.0117459130  -3.2970291 9.771339e-04
hmid                                    -0.039318212  0.0076281568  -5.1543529 2.545083e-07
hpmid                                   -0.054045650  0.0092758603  -5.8264838 5.660736e-09
hwrk                                     0.043804814  0.0092096279   4.7564151 1.970610e-06
rlh                                      0.019687021  0.0239424022   0.8222659 4.109256e-01
hhsize                                   0.001968586  0.0009508814   2.0702747 3.842662e-02
mih                                     -0.001373967  0.0096095931  -0.1429787 8.863070e-01
fih                                     -0.024550948  0.0245043404  -1.0019020 3.163909e-01
chr                                     -0.002386487  0.0164360875  -0.1451980 8.845546e-01
mos                                     -0.006168041  0.0169854855  -0.3631360 7.165033e-01
trd                                      0.054127124  0.0211484031   2.5593953 1.048544e-02
as.factor(EcZone)Forest                 -0.008700201  0.0098987920  -0.8789155 3.794471e-01
as.factor(EcZone)Savannah               -0.006464277  0.0161618620  -0.3999710 6.891778e-01
as.factor(region)Brong Ahafo             0.026703495  0.0169040484   1.5797100 1.141733e-01
as.factor(region)Central                -0.013922866  0.0124300850  -1.1200942 2.626736e-01
as.factor(region)Eastern                 0.029185341  0.0132168477   2.2081923 2.723087e-02
as.factor(region)Greater Accra          -0.007574036  0.0144623918  -0.5237056 6.004833e-01
as.factor(region)Northern               -0.023270310  0.0185898450  -1.2517753 2.106517e-01
as.factor(region)Upper East              0.028149836  0.0203940033   1.3802996 1.674944e-01
as.factor(region)Upper West              0.018957896  0.0193755190   0.9784459 3.278539e-01
as.factor(region)Volta                  -0.010408924  0.0136472522  -0.7627121 4.456351e-01
as.factor(region)Western                 0.003689838  0.0131135565   0.2813758 7.784221e-01
as.factor(mdate)2                        0.001505156  0.0109817824   0.1370594 8.909839e-01
as.factor(mdate)3                        0.003061339  0.0110202048   0.2777933 7.811710e-01
as.factor(mdate)4                        0.026014498  0.0121984343   2.1326096 3.295676e-02
as.factor(mdate)5                        0.008857070  0.0115210652   0.7687718 4.420288e-01
as.factor(mdate)6                        0.250907629  0.0491052346   5.1095903 3.228582e-07
as.factor(mdate)7                        0.019016011  0.0120149307   1.5826983 1.134902e-01
as.factor(mdate)8                        0.033334875  0.0129205877   2.5799813 9.880565e-03
as.factor(mdate)9                        0.015716528  0.0123926546   1.2682132 2.047218e-01
as.factor(mdate)10                      -0.040803189  0.0834404977  -0.4890094 6.248350e-01
as.factor(mdate)11                      -0.050269217  0.0833192824  -0.6033323 5.462876e-01
as.factor(mdate)12                      -0.083542184  0.0615920819  -1.3563786 1.749787e-01
as.factor(ydate)2013                    -0.049079709  0.0823983633  -0.5956394 5.514162e-01
as.factor(mdate)10:as.factor(ydate)2013 -0.048697834  0.1734159901  -0.2808151 7.788522e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.3634 -0.3866 -0.1452  0.3986  1.2064 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.48603    0.07114  -6.832 8.66e-12 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5 on 15906 degrees of freedom
Multiple R-Squared: 0.8545,	Adjusted R-squared: 0.8541 
Wald test:  1701 on 42 and 15906 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Sub Sample Results by Rural/Urban (1/0) 
Sub-sample is  0  
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC  t value HC  Pr(>|t|) HC
(Intercept)                             -0.1928316770  0.0913105168 -2.11182330 3.470161e-02
rho                                      0.5461084112  0.0499191094 10.93986687 0.000000e+00
pv2                                     -0.0032121152  0.0105842953 -0.30347936 7.615246e-01
emp                                      0.0837831250  0.0347049417  2.41415547 1.577173e-02
sinsch                                  -0.0779645476  0.0321811112 -2.42268041 1.540647e-02
s1q5y                                    0.0284775512  0.0055734782  5.10947568 3.230541e-07
I(s1q5y^2)                              -0.0009060647  0.0002638869 -3.43353481 5.957657e-04
female                                   0.0065194371  0.0064064688  1.01763347 3.088522e-01
hprim                                   -0.0159029166  0.0142087681 -1.11923261 2.630409e-01
hmid                                    -0.0253155234  0.0092537123 -2.73571543 6.224483e-03
hpmid                                   -0.0458376470  0.0093693215 -4.89231231 9.965814e-07
hwrk                                     0.0266490764  0.0085555273  3.11483739 1.840463e-03
rlh                                      0.0059751289  0.0130389305  0.45825299 6.467707e-01
hhsize                                   0.0047835111  0.0015554346  3.07535348 2.102532e-03
mih                                     -0.0078704265  0.0107136767 -0.73461490 4.625741e-01
fih                                     -0.0057703393  0.0090134370 -0.64019300 5.220471e-01
chr                                      0.0094694623  0.0318108317  0.29768044 7.659471e-01
mos                                     -0.0046600229  0.0330739944 -0.14089689 8.879514e-01
trd                                     -0.0038932730  0.0348540394 -0.11170220 9.110595e-01
as.factor(EcZone)Forest                  0.0020295874  0.0106252720  0.19101510 8.485138e-01
as.factor(EcZone)Savannah                0.0035455068  0.0229081552  0.15477051 8.770022e-01
as.factor(region)Brong Ahafo             0.0112747973  0.0200047161  0.56360696 5.730216e-01
as.factor(region)Central                 0.0021958067  0.0121844161  0.18021436 8.569843e-01
as.factor(region)Eastern                 0.0330824872  0.0157943003  2.09458391 3.620800e-02
as.factor(region)Greater Accra           0.0013919602  0.0143196014  0.09720663 9.225623e-01
as.factor(region)Northern                0.0067261193  0.0261030977  0.25767514 7.966576e-01
as.factor(region)Upper East              0.0439549554  0.0296833116  1.48079689 1.386607e-01
as.factor(region)Upper West             -0.0015534660  0.0260692828 -0.05958990 9.524823e-01
as.factor(region)Volta                  -0.0057798750  0.0144992635 -0.39863232 6.901641e-01
as.factor(region)Western                -0.0014792314  0.0143049158 -0.10340721 9.176398e-01
as.factor(mdate)2                       -0.0128464919  0.0136952471 -0.93802556 3.482313e-01
as.factor(mdate)3                       -0.0104684076  0.0150600427 -0.69511141 4.869855e-01
as.factor(mdate)4                        0.0104709261  0.0140667837  0.74437244 4.566512e-01
as.factor(mdate)5                       -0.0019746839  0.0129004387 -0.15307107 8.783422e-01
as.factor(mdate)7                       -0.0137995607  0.0141009095 -0.97862913 3.277633e-01
as.factor(mdate)8                       -0.0037376405  0.0145279166 -0.25727299 7.969680e-01
as.factor(mdate)9                       -0.0009989849  0.0142790834 -0.06996141 9.442244e-01
as.factor(mdate)10                      -0.0074704125  0.0686419769 -0.10883155 9.133361e-01
as.factor(mdate)11                      -0.0164743048  0.0684373448 -0.24072098 8.097714e-01
as.factor(mdate)12                       0.0077166605  0.0412156539  0.18722645 8.514831e-01
as.factor(ydate)2013                    -0.0021936967  0.0665665167 -0.03295496 9.737105e-01
as.factor(mdate)10:as.factor(ydate)2013  0.0828529119  0.0676794118  1.22419669 2.208780e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.2388 -0.2261 -0.1067  0.1582  1.5249 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept) -0.19283    0.06808  -2.832  0.00463 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.4185 on 7954 degrees of freedom
Multiple R-Squared: 0.402,	Adjusted R-squared: 0.3989 
Wald test: 37.16 on 41 and 7954 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Sub-sample is  1  
Printing heteroskedasticity-consistent results...  
                                            Estimates Std. Error HC   t value HC  Pr(>|t|) HC
(Intercept)                             -4.785538e-01  0.1073114403  -4.45948555 8.215661e-06
rho                                      8.104145e-01  0.0438030472  18.50132772 0.000000e+00
pv2                                      8.761323e-03  0.0067251582   1.30276831 1.926539e-01
emp                                      1.242485e-01  0.0425098386   2.92281683 3.468805e-03
sinsch                                  -9.504145e-02  0.0309194666  -3.07383857 2.113237e-03
s1q5y                                    9.336245e-02  0.0056717264  16.46102832 0.000000e+00
I(s1q5y^2)                              -2.677978e-03  0.0002654622 -10.08798070 0.000000e+00
female                                  -1.464356e-02  0.0061773193  -2.37053617 1.776231e-02
hprim                                   -2.870191e-02  0.0122796869  -2.33734849 1.942107e-02
hmid                                    -2.618377e-02  0.0083915549  -3.12025240 1.806961e-03
hpmid                                   -4.314791e-02  0.0136131843  -3.16956781 1.526658e-03
hwrk                                     8.496559e-02  0.0108894484   7.80256140 5.995204e-15
rlh                                     -1.086328e-02  0.0132411838  -0.82041623 4.119789e-01
hhsize                                  -7.245934e-05  0.0009927618  -0.07298764 9.418160e-01
mih                                     -7.158802e-03  0.0114417210  -0.62567525 5.315280e-01
fih                                      1.073961e-02  0.0099172097   1.08292678 2.788409e-01
chr                                     -2.623046e-03  0.0164233490  -0.15971446 8.731060e-01
mos                                     -2.228737e-03  0.0172698718  -0.12905348 8.973153e-01
trd                                      4.681684e-02  0.0602342347   0.77724630 4.370135e-01
as.factor(EcZone)Forest                 -1.621170e-04  0.0116888643  -0.01386936 9.889342e-01
as.factor(EcZone)Savannah                4.922630e-03  0.0178547932   0.27570355 7.827758e-01
as.factor(region)Brong Ahafo             4.385374e-02  0.0196988863   2.22620399 2.600052e-02
as.factor(region)Central                -4.936268e-03  0.0161777555  -0.30512686 7.602695e-01
as.factor(region)Eastern                 2.165427e-02  0.0157893929   1.37144412 1.702366e-01
as.factor(region)Greater Accra           1.595748e-02  0.0282399770   0.56506719 5.720281e-01
as.factor(region)Northern                6.493458e-03  0.0218477299   0.29721429 7.663029e-01
as.factor(region)Upper East              4.199219e-02  0.0230047191   1.82537279 6.794479e-02
as.factor(region)Upper West              3.749213e-02  0.0226155481   1.65780335 9.735716e-02
as.factor(region)Volta                   1.255337e-02  0.0167347181   0.75013918 4.531709e-01
as.factor(region)Western                 1.481887e-02  0.0160981281   0.92053401 3.572938e-01
as.factor(mdate)2                       -3.557520e-03  0.0130486417  -0.27263529 7.851336e-01
as.factor(mdate)3                       -3.604489e-03  0.0126820891  -0.28421886 7.762427e-01
as.factor(mdate)4                       -3.297379e-04  0.0137017851  -0.02406533 9.808005e-01
as.factor(mdate)5                       -1.002787e-02  0.0139328764  -0.71972741 4.716928e-01
as.factor(mdate)6                        2.656816e-01  0.0729247499   3.64322969 2.692384e-04
as.factor(mdate)7                        7.452271e-03  0.0145201507   0.51323651 6.077859e-01
as.factor(mdate)8                        1.834315e-02  0.0152646413   1.20167569 2.294892e-01
as.factor(mdate)9                        4.009879e-03  0.0150779754   0.26594277 7.902833e-01
as.factor(mdate)10                      -1.994469e-01  0.0930595800  -2.14321709 3.209567e-02
as.factor(mdate)11                      -1.996706e-01  0.0933113768  -2.13983118 3.236841e-02
as.factor(mdate)12                      -2.103551e-01  0.0753919626  -2.79015263 5.268320e-03
as.factor(ydate)2013                    -1.896927e-01  0.0914406565  -2.07449013 3.803381e-02
as.factor(mdate)10:as.factor(ydate)2013  1.688246e-02  0.1905244109   0.08861050 9.293915e-01

 For goodness-of-fit measures viz. R-squared, Wald Tests. 

Call:
AER::ivreg(formula = y ~ as.matrix(R[, -1]) | as.matrix(Z[, -1]), 
    weights = 1/e2)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.0181 -0.4718 -0.1661  0.4908  1.0803 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -0.4786     0.1326  -3.608  0.00031 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.5347 on 13144 degrees of freedom
Multiple R-Squared: 0.9306,	Adjusted R-squared: 0.9304 
Wald test:  3712 on 42 and 13144 DF,  p-value: < 2.2e-16 


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
