Question 7: Genetic Matching Analysis

library(Matching)
library(rgenoud)
library(quantreg)
set.seed(123)

file_path <- "/Users/katiankurunzizagwaneza/Downloads/female_lalonde.csv"
lal <- read.csv(file_path)

TASK 1: RCT Regression Analysis

rct_data <- lal[lal$treated != 99, ]

regression_rct <- lm(re79 ~ age + educ + nodegree + married + black + hisp + 
                     re75 + re74 + nchildren75 + zero74 + zero75 + treated, 
                     data = rct_data)

summary(regression_rct)
## 
## Call:
## lm(formula = re79 ~ age + educ + nodegree + married + black + 
##     hisp + re75 + re74 + nchildren75 + zero74 + zero75 + treated, 
##     data = rct_data)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
##  -7666  -4056  -2724   4199  24941 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)   
## (Intercept) 1972.33872 1807.45761   1.091  0.27540   
## age           -0.82507   22.06427  -0.037  0.97018   
## educ         182.33368  105.36726   1.730  0.08381 . 
## nodegree    -762.31495  437.77162  -1.741  0.08188 . 
## married      870.16551  898.83039   0.968  0.33319   
## black        229.61323  709.20579   0.324  0.74618   
## hisp         908.58533  829.37418   1.096  0.27352   
## re75           0.16021    0.31893   0.502  0.61552   
## re74          -0.02356    0.30040  -0.078  0.93751   
## nchildren75   99.17803  119.36985   0.831  0.40623   
## zero74      -907.72359 1292.61438  -0.702  0.48267   
## zero75       741.29602 1216.25319   0.609  0.54232   
## treated      868.89227  307.41041   2.826  0.00479 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5276 on 1173 degrees of freedom
##   (416 observations deleted due to missingness)
## Multiple R-squared:  0.02661,    Adjusted R-squared:  0.01665 
## F-statistic: 2.672 on 12 and 1173 DF,  p-value: 0.001503
ci_rct <- confint(regression_rct, "treated", level = 0.95)
treat_coef <- coef(regression_rct)["treated"]
treat_se <- summary(regression_rct)$coefficients["treated", "Std. Error"]

The RCT regression estimates a treatment coefficient of $868.89 with a standard error of $307.41. The 95% confidence interval is [$265.76, $1472.03].

TASK 2: Create Observational Dataset

rct_1 <- lal[lal$treated == 1, ]
psid <- lal[lal$treated == 99, ]
obs_data <- rbind(rct_1, psid)
obs_data$treated[obs_data$treated == 99] <- 0

The observational dataset combines 800 RCT treatment units with 648 PSID comparison units, after deleting RCT controls and relabeling PSID units from 99 to 0.

TASK 3: Genetic Matching

required <- c("treated", "re79", "age", "educ", "nodegree", "married", 
              "black", "hisp", "re75", "re74", "nchildren75", "zero74", "zero75")

initial_n <- nrow(obs_data)
obs_data <- obs_data[complete.cases(obs_data[, required]), ]

Y  <- obs_data$re79
Tr <- obs_data$treated
X  <- as.matrix(obs_data[, c("age", "educ", "nodegree", "married", "black", 
                              "hisp", "re75", "re74", "nchildren75", "zero74", "zero75")])

genout <- GenMatch(Tr = Tr, X = X, estimand = "ATT", 
                   pop.size = 100, 
                   wait.generations = 10, 
                   max.generations = 100)
## 
## 
## Sat Nov 29 10:44:58 2025
## Domains:
##  0.000000e+00   <=  X1   <=    1.000000e+03 
##  0.000000e+00   <=  X2   <=    1.000000e+03 
##  0.000000e+00   <=  X3   <=    1.000000e+03 
##  0.000000e+00   <=  X4   <=    1.000000e+03 
##  0.000000e+00   <=  X5   <=    1.000000e+03 
##  0.000000e+00   <=  X6   <=    1.000000e+03 
##  0.000000e+00   <=  X7   <=    1.000000e+03 
##  0.000000e+00   <=  X8   <=    1.000000e+03 
##  0.000000e+00   <=  X9   <=    1.000000e+03 
##  0.000000e+00   <=  X10  <=    1.000000e+03 
##  0.000000e+00   <=  X11  <=    1.000000e+03 
## 
## Data Type: Floating Point
## Operators (code number, name, population) 
##  (1) Cloning...........................  15
##  (2) Uniform Mutation..................  12
##  (3) Boundary Mutation.................  12
##  (4) Non-Uniform Mutation..............  12
##  (5) Polytope Crossover................  12
##  (6) Simple Crossover..................  12
##  (7) Whole Non-Uniform Mutation........  12
##  (8) Heuristic Crossover...............  12
##  (9) Local-Minimum Crossover...........  0
## 
## SOFT Maximum Number of Generations: 100
## Maximum Nonchanging Generations: 10
## Population size       : 100
## Convergence Tolerance: 1.000000e-03
## 
## Not Using the BFGS Derivative Based Optimizer on the Best Individual Each Generation.
## Not Checking Gradients before Stopping.
## Using Out of Bounds Individuals.
## 
## Maximization Problem.
## GENERATION: 0 (initializing the population)
## Lexical Fit..... 3.047132e-02  4.523096e-02  4.523096e-02  4.541939e-02  8.757273e-02  9.533573e-02  9.533573e-02  1.007982e-01  1.022326e-01  1.022326e-01  1.240223e-01  1.493585e-01  3.701387e-01  4.386546e-01  4.386546e-01  5.806836e-01  7.657632e-01  9.838922e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 100, #Total UniqueCount: 100
## var 1:
## best............ 6.399508e+02
## mean............ 4.169360e+02
## variance........ 7.407766e+04
## var 2:
## best............ 4.951271e+02
## mean............ 4.939857e+02
## variance........ 7.450328e+04
## var 3:
## best............ 8.241639e+02
## mean............ 4.751461e+02
## variance........ 8.223516e+04
## var 4:
## best............ 6.672848e+02
## mean............ 5.365328e+02
## variance........ 7.972703e+04
## var 5:
## best............ 4.792263e+02
## mean............ 5.132418e+02
## variance........ 7.685596e+04
## var 6:
## best............ 3.542308e+02
## mean............ 4.930310e+02
## variance........ 7.962956e+04
## var 7:
## best............ 8.601728e+02
## mean............ 4.905039e+02
## variance........ 8.954627e+04
## var 8:
## best............ 8.940415e+02
## mean............ 5.090883e+02
## variance........ 8.447793e+04
## var 9:
## best............ 5.661670e+02
## mean............ 5.483917e+02
## variance........ 7.463335e+04
## var 10:
## best............ 2.966312e+02
## mean............ 4.814035e+02
## variance........ 1.016940e+05
## var 11:
## best............ 2.267187e+02
## mean............ 5.084226e+02
## variance........ 6.857219e+04
## 
## GENERATION: 1
## Lexical Fit..... 4.523096e-02  4.523096e-02  6.992704e-02  1.777851e-01  1.777851e-01  3.988292e-01  4.352997e-01  6.617869e-01  6.617869e-01  6.826180e-01  7.377578e-01  7.959696e-01  8.757937e-01  9.372188e-01  9.977423e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 72, #Total UniqueCount: 172
## var 1:
## best............ 2.638668e+02
## mean............ 4.835156e+02
## variance........ 6.238542e+04
## var 2:
## best............ 7.247706e+02
## mean............ 4.804955e+02
## variance........ 5.081422e+04
## var 3:
## best............ 5.439472e+02
## mean............ 6.314969e+02
## variance........ 6.143645e+04
## var 4:
## best............ 6.620324e+02
## mean............ 6.194565e+02
## variance........ 3.086899e+04
## var 5:
## best............ 6.531619e+02
## mean............ 5.588080e+02
## variance........ 4.311099e+04
## var 6:
## best............ 2.079437e+02
## mean............ 3.991167e+02
## variance........ 4.128815e+04
## var 7:
## best............ 4.840910e+02
## mean............ 7.129312e+02
## variance........ 4.290013e+04
## var 8:
## best............ 2.410320e+02
## mean............ 6.207208e+02
## variance........ 8.467409e+04
## var 9:
## best............ 3.877275e+02
## mean............ 5.165243e+02
## variance........ 3.061212e+04
## var 10:
## best............ 3.057836e+01
## mean............ 2.957694e+02
## variance........ 5.288169e+04
## var 11:
## best............ 1.063022e+00
## mean............ 2.862000e+02
## variance........ 4.368734e+04
## 
## GENERATION: 2
## Lexical Fit..... 4.523096e-02  4.523096e-02  6.992704e-02  1.777851e-01  1.777851e-01  4.317546e-01  4.512953e-01  6.826180e-01  7.729144e-01  7.729144e-01  7.912718e-01  7.959696e-01  8.757937e-01  9.372188e-01  9.453952e-01  9.977423e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 73, #Total UniqueCount: 245
## var 1:
## best............ 2.635134e+02
## mean............ 4.140467e+02
## variance........ 2.967356e+04
## var 2:
## best............ 7.249864e+02
## mean............ 6.683738e+02
## variance........ 2.213300e+04
## var 3:
## best............ 5.436838e+02
## mean............ 5.915193e+02
## variance........ 1.872608e+04
## var 4:
## best............ 6.620274e+02
## mean............ 6.590876e+02
## variance........ 9.426965e+03
## var 5:
## best............ 6.533254e+02
## mean............ 6.057835e+02
## variance........ 1.252188e+04
## var 6:
## best............ 2.078063e+02
## mean............ 2.544481e+02
## variance........ 1.378099e+04
## var 7:
## best............ 4.837376e+02
## mean............ 5.579216e+02
## variance........ 2.757532e+04
## var 8:
## best............ 2.404183e+02
## mean............ 3.821262e+02
## variance........ 6.970273e+04
## var 9:
## best............ 3.875598e+02
## mean............ 4.488240e+02
## variance........ 1.934791e+04
## var 10:
## best............ 3.032834e+01
## mean............ 1.328547e+02
## variance........ 3.178595e+04
## var 11:
## best............ 8.509641e-01
## mean............ 7.999842e+01
## variance........ 1.767993e+04
## 
## GENERATION: 3
## Lexical Fit..... 4.523096e-02  4.523096e-02  8.200885e-02  1.769090e-01  2.925630e-01  2.925630e-01  3.009878e-01  3.558389e-01  3.558389e-01  3.696631e-01  5.665547e-01  6.546464e-01  7.751807e-01  8.775711e-01  9.106350e-01  9.106350e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 69, #Total UniqueCount: 314
## var 1:
## best............ 4.196305e+02
## mean............ 2.842329e+02
## variance........ 9.720059e+03
## var 2:
## best............ 7.528768e+02
## mean............ 7.021627e+02
## variance........ 1.545436e+04
## var 3:
## best............ 5.762316e+02
## mean............ 5.523262e+02
## variance........ 6.736513e+03
## var 4:
## best............ 7.153205e+02
## mean............ 6.481464e+02
## variance........ 9.239723e+03
## var 5:
## best............ 7.139270e+02
## mean............ 6.331875e+02
## variance........ 1.101102e+04
## var 6:
## best............ 2.073529e+02
## mean............ 2.111735e+02
## variance........ 3.837909e+03
## var 7:
## best............ 5.866295e+02
## mean............ 4.889804e+02
## variance........ 4.325287e+03
## var 8:
## best............ 2.397792e+02
## mean............ 2.604280e+02
## variance........ 9.799691e+03
## var 9:
## best............ 4.453942e+02
## mean............ 3.995071e+02
## variance........ 7.934484e+03
## var 10:
## best............ 1.616052e+01
## mean............ 6.938895e+01
## variance........ 2.096338e+04
## var 11:
## best............ 5.889069e-01
## mean............ 3.159667e+01
## variance........ 1.104230e+04
## 
## GENERATION: 4
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.066306e-01  1.072449e-01  1.096304e-01  1.226742e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  4.819676e-01  4.881474e-01  5.352483e-01  5.352483e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 72, #Total UniqueCount: 386
## var 1:
## best............ 4.196305e+02
## mean............ 3.498634e+02
## variance........ 1.043480e+04
## var 2:
## best............ 7.275812e+02
## mean............ 7.357403e+02
## variance........ 2.344391e+03
## var 3:
## best............ 9.267002e+02
## mean............ 6.176844e+02
## variance........ 2.467235e+04
## var 4:
## best............ 6.673612e+02
## mean............ 6.834983e+02
## variance........ 2.610927e+03
## var 5:
## best............ 6.592384e+02
## mean............ 6.708676e+02
## variance........ 4.937155e+03
## var 6:
## best............ 2.078847e+02
## mean............ 2.198865e+02
## variance........ 4.565633e+03
## var 7:
## best............ 4.943449e+02
## mean............ 5.224792e+02
## variance........ 9.665540e+03
## var 8:
## best............ 2.409067e+02
## mean............ 2.521519e+02
## variance........ 4.193227e+03
## var 9:
## best............ 3.934941e+02
## mean............ 4.046905e+02
## variance........ 3.847172e+03
## var 10:
## best............ 2.913658e+01
## mean............ 4.100653e+01
## variance........ 7.248102e+03
## var 11:
## best............ 1.015611e+00
## mean............ 2.985966e+01
## variance........ 1.015469e+04
## 
## GENERATION: 5
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.066306e-01  1.072449e-01  1.226742e-01  1.230175e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  5.002222e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 75, #Total UniqueCount: 461
## var 1:
## best............ 4.196110e+02
## mean............ 4.102407e+02
## variance........ 9.254387e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.261582e+02
## variance........ 9.573008e+03
## var 3:
## best............ 9.275162e+02
## mean............ 6.927977e+02
## variance........ 2.812884e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.876186e+02
## variance........ 4.158843e+03
## var 5:
## best............ 6.591029e+02
## mean............ 6.819421e+02
## variance........ 3.600207e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.160187e+02
## variance........ 2.245841e+03
## var 7:
## best............ 4.941161e+02
## mean............ 5.398228e+02
## variance........ 6.130098e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.501023e+02
## variance........ 5.867269e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.410374e+02
## variance........ 5.538786e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.749391e+01
## variance........ 8.747335e+03
## var 11:
## best............ 1.016642e+00
## mean............ 2.537788e+01
## variance........ 1.310761e+04
## 
## GENERATION: 6
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 74, #Total UniqueCount: 535
## var 1:
## best............ 4.196110e+02
## mean............ 4.139398e+02
## variance........ 4.577971e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.296392e+02
## variance........ 9.173115e+02
## var 3:
## best............ 9.275162e+02
## mean............ 8.109948e+02
## variance........ 2.299583e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.829869e+02
## variance........ 4.120910e+03
## var 5:
## best............ 3.900387e+02
## mean............ 6.524898e+02
## variance........ 9.759296e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.234065e+02
## variance........ 4.766841e+03
## var 7:
## best............ 4.941161e+02
## mean............ 5.271046e+02
## variance........ 3.154242e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.658565e+02
## variance........ 9.482985e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.133708e+02
## variance........ 3.775565e+03
## var 10:
## best............ 2.916871e+01
## mean............ 6.501885e+01
## variance........ 2.012509e+04
## var 11:
## best............ 1.016642e+00
## mean............ 2.499316e+01
## variance........ 9.209931e+03
## 
## GENERATION: 7
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 73, #Total UniqueCount: 608
## var 1:
## best............ 4.196110e+02
## mean............ 4.059985e+02
## variance........ 7.753007e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.206434e+02
## variance........ 4.147995e+03
## var 3:
## best............ 9.275162e+02
## mean............ 9.161026e+02
## variance........ 1.811369e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.699696e+02
## variance........ 1.900820e+03
## var 5:
## best............ 3.900387e+02
## mean............ 5.215267e+02
## variance........ 2.855650e+04
## var 6:
## best............ 2.078860e+02
## mean............ 2.277876e+02
## variance........ 7.710204e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.794649e+02
## variance........ 4.429655e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.654875e+02
## variance........ 7.415422e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.993892e+02
## variance........ 3.337719e+03
## var 10:
## best............ 2.916871e+01
## mean............ 6.298557e+01
## variance........ 1.606392e+04
## var 11:
## best............ 1.016642e+00
## mean............ 2.306090e+01
## variance........ 6.905618e+03
## 
## GENERATION: 8
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 66, #Total UniqueCount: 674
## var 1:
## best............ 4.196110e+02
## mean............ 4.150305e+02
## variance........ 3.373038e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.049451e+02
## variance........ 5.848875e+03
## var 3:
## best............ 9.275162e+02
## mean............ 9.113670e+02
## variance........ 3.143459e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.518634e+02
## variance........ 8.745341e+03
## var 5:
## best............ 3.900387e+02
## mean............ 4.185558e+02
## variance........ 1.191032e+04
## var 6:
## best............ 2.078860e+02
## mean............ 2.280334e+02
## variance........ 7.266762e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.828827e+02
## variance........ 5.013685e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.671464e+02
## variance........ 8.378826e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.025390e+02
## variance........ 2.972686e+03
## var 10:
## best............ 2.916871e+01
## mean............ 5.181687e+01
## variance........ 6.309387e+03
## var 11:
## best............ 1.016642e+00
## mean............ 2.944200e+01
## variance........ 1.242711e+04
## 
## GENERATION: 9
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 65, #Total UniqueCount: 739
## var 1:
## best............ 4.196110e+02
## mean............ 4.184408e+02
## variance........ 4.255930e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.214319e+02
## variance........ 1.656588e+03
## var 3:
## best............ 9.275162e+02
## mean............ 9.004967e+02
## variance........ 1.391120e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.536640e+02
## variance........ 6.099640e+03
## var 5:
## best............ 3.900387e+02
## mean............ 4.076339e+02
## variance........ 4.383284e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.263920e+02
## variance........ 7.687157e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.850968e+02
## variance........ 3.808705e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.547920e+02
## variance........ 6.591756e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.934972e+02
## variance........ 4.380074e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.276632e+01
## variance........ 2.323568e+03
## var 11:
## best............ 1.016642e+00
## mean............ 2.898028e+01
## variance........ 1.147486e+04
## 
## GENERATION: 10
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 65, #Total UniqueCount: 804
## var 1:
## best............ 4.196110e+02
## mean............ 4.262154e+02
## variance........ 4.114029e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.147962e+02
## variance........ 3.218410e+03
## var 3:
## best............ 9.275162e+02
## mean............ 8.886017e+02
## variance........ 1.718646e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.510680e+02
## variance........ 5.500312e+03
## var 5:
## best............ 3.900387e+02
## mean............ 3.985914e+02
## variance........ 5.684303e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.222875e+02
## variance........ 5.023411e+03
## var 7:
## best............ 4.941161e+02
## mean............ 5.056470e+02
## variance........ 5.304499e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.608177e+02
## variance........ 6.355146e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.943839e+02
## variance........ 3.970587e+03
## var 10:
## best............ 2.916871e+01
## mean............ 6.874408e+01
## variance........ 1.611166e+04
## var 11:
## best............ 1.016642e+00
## mean............ 2.196505e+01
## variance........ 6.630648e+03
## 
## GENERATION: 11
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 65, #Total UniqueCount: 869
## var 1:
## best............ 4.196110e+02
## mean............ 4.110879e+02
## variance........ 3.567574e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.108995e+02
## variance........ 5.783684e+03
## var 3:
## best............ 9.275162e+02
## mean............ 9.036136e+02
## variance........ 8.138268e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.565819e+02
## variance........ 3.987590e+03
## var 5:
## best............ 3.900387e+02
## mean............ 4.072256e+02
## variance........ 1.054634e+04
## var 6:
## best............ 2.078860e+02
## mean............ 2.298199e+02
## variance........ 1.020898e+04
## var 7:
## best............ 4.941161e+02
## mean............ 4.903721e+02
## variance........ 2.845427e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.583605e+02
## variance........ 3.328775e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.039204e+02
## variance........ 5.589003e+03
## var 10:
## best............ 2.916871e+01
## mean............ 6.246954e+01
## variance........ 1.255323e+04
## var 11:
## best............ 1.016642e+00
## mean............ 2.933853e+01
## variance........ 9.821599e+03
## 
## GENERATION: 12
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 65, #Total UniqueCount: 934
## var 1:
## best............ 4.196110e+02
## mean............ 4.232914e+02
## variance........ 2.322034e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.176146e+02
## variance........ 2.287296e+03
## var 3:
## best............ 9.275162e+02
## mean............ 9.027835e+02
## variance........ 5.659525e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.512018e+02
## variance........ 7.751475e+03
## var 5:
## best............ 3.900387e+02
## mean............ 3.884591e+02
## variance........ 2.772740e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.371644e+02
## variance........ 7.978838e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.973412e+02
## variance........ 1.809766e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.636069e+02
## variance........ 9.184744e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.038542e+02
## variance........ 6.997968e+03
## var 10:
## best............ 2.916871e+01
## mean............ 5.341306e+01
## variance........ 6.941037e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.570534e+01
## variance........ 4.310543e+03
## 
## GENERATION: 13
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.072449e-01  1.226742e-01  1.243901e-01  1.369969e-01  1.371978e-01  1.371978e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.533373e-01  4.533373e-01  4.715806e-01  4.942579e-01  8.763888e-01  9.375971e-01  9.873996e-01  9.887328e-01  1.000000e+00  1.000000e+00  
## #unique......... 63, #Total UniqueCount: 997
## var 1:
## best............ 4.196110e+02
## mean............ 4.320488e+02
## variance........ 8.331006e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.105673e+02
## variance........ 5.522723e+03
## var 3:
## best............ 9.275162e+02
## mean............ 9.170907e+02
## variance........ 2.406012e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.541889e+02
## variance........ 5.362173e+03
## var 5:
## best............ 3.900387e+02
## mean............ 3.885830e+02
## variance........ 1.403885e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.260006e+02
## variance........ 6.729244e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.981092e+02
## variance........ 4.193397e+03
## var 8:
## best............ 2.409094e+02
## mean............ 2.527323e+02
## variance........ 2.854535e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.039517e+02
## variance........ 2.047084e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.274839e+01
## variance........ 3.566710e+03
## var 11:
## best............ 1.016642e+00
## mean............ 2.602833e+01
## variance........ 1.112900e+04
## 
## GENERATION: 14
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.080621e-01  1.226742e-01  1.398751e-01  1.559467e-01  1.669638e-01  2.293359e-01  2.293359e-01  2.642399e-01  2.642399e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  4.170204e-01  8.763888e-01  9.079025e-01  9.096685e-01  9.597792e-01  1.000000e+00  1.000000e+00  
## #unique......... 59, #Total UniqueCount: 1056
## var 1:
## best............ 4.196110e+02
## mean............ 4.179289e+02
## variance........ 4.246036e+02
## var 2:
## best............ 7.275186e+02
## mean............ 7.252052e+02
## variance........ 1.293066e+03
## var 3:
## best............ 9.275162e+02
## mean............ 8.982543e+02
## variance........ 1.064109e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.597970e+02
## variance........ 2.894868e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.873208e+02
## variance........ 1.668081e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.364206e+02
## variance........ 9.825797e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.972066e+02
## variance........ 5.356253e+03
## var 8:
## best............ 1.342969e+02
## mean............ 2.563817e+02
## variance........ 4.764932e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.915512e+02
## variance........ 1.725493e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.111819e+01
## variance........ 3.549864e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.811144e+01
## variance........ 7.208761e+03
## 
## GENERATION: 15
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.226742e-01  1.258120e-01  1.740802e-01  1.935190e-01  1.935190e-01  1.957768e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  5.915289e-01  7.823021e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 62, #Total UniqueCount: 1118
## var 1:
## best............ 4.196110e+02
## mean............ 4.199652e+02
## variance........ 1.480280e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.226144e+02
## variance........ 2.097664e+03
## var 3:
## best............ 9.803247e+02
## mean............ 9.176624e+02
## variance........ 2.346399e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.577373e+02
## variance........ 4.479106e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.742278e+02
## variance........ 3.150645e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.193854e+02
## variance........ 3.820655e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.874083e+02
## variance........ 1.409604e+03
## var 8:
## best............ 1.342969e+02
## mean............ 2.026131e+02
## variance........ 6.831512e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.054349e+02
## variance........ 2.369549e+03
## var 10:
## best............ 2.916871e+01
## mean............ 5.572999e+01
## variance........ 7.909590e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.100033e+01
## variance........ 2.139294e+03
## 
## GENERATION: 16
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.226742e-01  1.258120e-01  1.740802e-01  1.935190e-01  1.935190e-01  1.957768e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  5.915289e-01  7.823021e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 62, #Total UniqueCount: 1180
## var 1:
## best............ 4.196110e+02
## mean............ 4.288439e+02
## variance........ 2.053176e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.080292e+02
## variance........ 7.218253e+03
## var 3:
## best............ 9.803247e+02
## mean............ 9.310952e+02
## variance........ 8.124412e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.603517e+02
## variance........ 6.754120e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.607688e+02
## variance........ 1.257836e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.181978e+02
## variance........ 3.815133e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.878974e+02
## variance........ 2.796770e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.596047e+02
## variance........ 2.638059e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.000804e+02
## variance........ 3.266002e+03
## var 10:
## best............ 2.916871e+01
## mean............ 5.505151e+01
## variance........ 8.911538e+03
## var 11:
## best............ 1.016642e+00
## mean............ 3.601336e+01
## variance........ 1.279843e+04
## 
## GENERATION: 17
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.226742e-01  1.258120e-01  1.740802e-01  1.935190e-01  1.935190e-01  1.957768e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  5.915289e-01  7.823021e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 60, #Total UniqueCount: 1240
## var 1:
## best............ 4.196110e+02
## mean............ 4.196547e+02
## variance........ 1.029293e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.235659e+02
## variance........ 1.318064e+03
## var 3:
## best............ 9.803247e+02
## mean............ 9.588202e+02
## variance........ 6.704499e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.677605e+02
## variance........ 2.558532e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.520061e+02
## variance........ 9.312080e+02
## var 6:
## best............ 2.078860e+02
## mean............ 2.261932e+02
## variance........ 8.117934e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.925564e+02
## variance........ 1.093548e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.477703e+02
## variance........ 3.175377e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.966732e+02
## variance........ 1.247025e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.512421e+01
## variance........ 7.167207e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.579297e+01
## variance........ 6.957803e+03
## 
## GENERATION: 18
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.226742e-01  1.258120e-01  1.740802e-01  1.935190e-01  1.935190e-01  1.957768e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  5.915289e-01  7.823021e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 63, #Total UniqueCount: 1303
## var 1:
## best............ 4.196110e+02
## mean............ 4.250704e+02
## variance........ 6.248143e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.284861e+02
## variance........ 1.215853e+03
## var 3:
## best............ 9.803247e+02
## mean............ 9.725469e+02
## variance........ 2.765762e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.641863e+02
## variance........ 2.406758e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.563760e+02
## variance........ 2.314478e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.275626e+02
## variance........ 6.486972e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.978915e+02
## variance........ 6.986524e+02
## var 8:
## best............ 1.342969e+02
## mean............ 1.404960e+02
## variance........ 1.311247e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.917255e+02
## variance........ 1.672648e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.524296e+01
## variance........ 3.216443e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.433439e+01
## variance........ 7.114841e+03
## 
## GENERATION: 19
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.226742e-01  1.258120e-01  1.740802e-01  1.935190e-01  1.935190e-01  1.957768e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  5.915289e-01  7.823021e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 60, #Total UniqueCount: 1363
## var 1:
## best............ 4.196110e+02
## mean............ 4.192911e+02
## variance........ 1.490530e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.255014e+02
## variance........ 1.771368e+03
## var 3:
## best............ 9.803247e+02
## mean............ 9.676279e+02
## variance........ 6.788582e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.643495e+02
## variance........ 2.323848e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.573664e+02
## variance........ 2.749186e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.265331e+02
## variance........ 7.330553e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.991650e+02
## variance........ 2.602706e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.571688e+02
## variance........ 1.055827e+04
## var 9:
## best............ 3.933655e+02
## mean............ 3.909429e+02
## variance........ 4.478007e+02
## var 10:
## best............ 2.916871e+01
## mean............ 4.033838e+01
## variance........ 4.114607e+03
## var 11:
## best............ 1.016642e+00
## mean............ 2.742441e+01
## variance........ 8.590204e+03
## 
## GENERATION: 20
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.226742e-01  1.258120e-01  1.740802e-01  1.935190e-01  1.935190e-01  1.957768e-01  3.173110e-01  3.173110e-01  3.173110e-01  3.173110e-01  5.915289e-01  7.823021e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 60, #Total UniqueCount: 1423
## var 1:
## best............ 4.196110e+02
## mean............ 4.239011e+02
## variance........ 3.620547e+03
## var 2:
## best............ 7.275186e+02
## mean............ 7.216222e+02
## variance........ 3.956590e+03
## var 3:
## best............ 9.803247e+02
## mean............ 9.484838e+02
## variance........ 1.308663e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.509186e+02
## variance........ 5.739975e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.535785e+02
## variance........ 3.190785e+03
## var 6:
## best............ 2.078860e+02
## mean............ 2.136417e+02
## variance........ 5.189472e+03
## var 7:
## best............ 4.941161e+02
## mean............ 5.012159e+02
## variance........ 2.377434e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.461998e+02
## variance........ 3.333991e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.960134e+02
## variance........ 3.586176e+02
## var 10:
## best............ 2.916871e+01
## mean............ 6.049165e+01
## variance........ 1.643758e+04
## var 11:
## best............ 1.016642e+00
## mean............ 2.875054e+01
## variance........ 1.137271e+04
## 
## GENERATION: 21
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 63, #Total UniqueCount: 1486
## var 1:
## best............ 4.196110e+02
## mean............ 4.172519e+02
## variance........ 1.005023e+03
## var 2:
## best............ 7.018495e+02
## mean............ 7.092110e+02
## variance........ 5.099148e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.715881e+02
## variance........ 4.252349e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.583246e+02
## variance........ 9.117927e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.614642e+02
## variance........ 2.402709e+03
## var 6:
## best............ 3.548777e+02
## mean............ 2.208202e+02
## variance........ 4.913269e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.899722e+02
## variance........ 6.406457e+02
## var 8:
## best............ 1.342969e+02
## mean............ 1.451864e+02
## variance........ 1.958629e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.972504e+02
## variance........ 2.008769e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.924330e+01
## variance........ 9.187502e+03
## var 11:
## best............ 1.016642e+00
## mean............ 2.115581e+01
## variance........ 8.277176e+03
## 
## GENERATION: 22
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 63, #Total UniqueCount: 1549
## var 1:
## best............ 4.196110e+02
## mean............ 4.220995e+02
## variance........ 4.043559e+03
## var 2:
## best............ 7.018495e+02
## mean............ 7.070102e+02
## variance........ 3.394112e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.706419e+02
## variance........ 1.017482e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.607936e+02
## variance........ 5.317462e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.626307e+02
## variance........ 4.546053e+03
## var 6:
## best............ 3.548777e+02
## mean............ 2.853009e+02
## variance........ 1.061976e+04
## var 7:
## best............ 4.941161e+02
## mean............ 5.001903e+02
## variance........ 8.242814e+02
## var 8:
## best............ 1.342969e+02
## mean............ 1.508844e+02
## variance........ 6.056405e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.955870e+02
## variance........ 4.112220e+02
## var 10:
## best............ 2.916871e+01
## mean............ 4.723085e+01
## variance........ 5.841283e+03
## var 11:
## best............ 1.016642e+00
## mean............ 5.506881e+00
## variance........ 2.925171e+02
## 
## GENERATION: 23
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 62, #Total UniqueCount: 1611
## var 1:
## best............ 4.196110e+02
## mean............ 4.258062e+02
## variance........ 4.151819e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.895072e+02
## variance........ 7.746733e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.719469e+02
## variance........ 1.053124e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.698674e+02
## variance........ 2.423598e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.607370e+02
## variance........ 3.189172e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.430247e+02
## variance........ 3.617772e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.972447e+02
## variance........ 1.076714e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.558161e+02
## variance........ 1.193737e+04
## var 9:
## best............ 3.933655e+02
## mean............ 3.989934e+02
## variance........ 8.187842e+02
## var 10:
## best............ 2.916871e+01
## mean............ 4.141977e+01
## variance........ 2.282184e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.457619e+01
## variance........ 2.801359e+03
## 
## GENERATION: 24
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 58, #Total UniqueCount: 1669
## var 1:
## best............ 4.196110e+02
## mean............ 4.304203e+02
## variance........ 4.404833e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.896870e+02
## variance........ 5.836467e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.849788e+02
## variance........ 1.030989e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.572509e+02
## variance........ 2.224224e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.610870e+02
## variance........ 5.056857e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.582921e+02
## variance........ 3.107665e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.915149e+02
## variance........ 4.301917e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.431070e+02
## variance........ 1.912923e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.990123e+02
## variance........ 1.171226e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.512014e+01
## variance........ 3.343338e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.618197e+01
## variance........ 7.508507e+03
## 
## GENERATION: 25
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 60, #Total UniqueCount: 1729
## var 1:
## best............ 4.196110e+02
## mean............ 4.204640e+02
## variance........ 4.473409e+02
## var 2:
## best............ 7.018495e+02
## mean............ 6.953141e+02
## variance........ 1.528730e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.727030e+02
## variance........ 9.359426e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.545403e+02
## variance........ 5.358052e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.544914e+02
## variance........ 5.036534e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.674360e+02
## variance........ 5.793414e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.943677e+02
## variance........ 4.131471e+02
## var 8:
## best............ 1.342969e+02
## mean............ 1.396359e+02
## variance........ 7.686341e+02
## var 9:
## best............ 3.933655e+02
## mean............ 3.901706e+02
## variance........ 4.666452e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.754933e+01
## variance........ 6.015634e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.808994e+01
## variance........ 3.730624e+03
## 
## GENERATION: 26
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 53, #Total UniqueCount: 1782
## var 1:
## best............ 4.196110e+02
## mean............ 4.197288e+02
## variance........ 7.235415e+02
## var 2:
## best............ 7.018495e+02
## mean............ 6.841286e+02
## variance........ 5.395949e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.608378e+02
## variance........ 1.865079e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.539496e+02
## variance........ 4.939245e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.570549e+02
## variance........ 2.187647e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.656756e+02
## variance........ 1.989900e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.913194e+02
## variance........ 9.733179e+02
## var 8:
## best............ 1.342969e+02
## mean............ 1.673527e+02
## variance........ 1.615314e+04
## var 9:
## best............ 3.933655e+02
## mean............ 3.943238e+02
## variance........ 3.281098e+03
## var 10:
## best............ 2.916871e+01
## mean............ 5.733014e+01
## variance........ 1.645278e+04
## var 11:
## best............ 1.016642e+00
## mean............ 2.568962e+01
## variance........ 1.048715e+04
## 
## GENERATION: 27
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 62, #Total UniqueCount: 1844
## var 1:
## best............ 4.196110e+02
## mean............ 4.328640e+02
## variance........ 5.796541e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.934977e+02
## variance........ 2.661862e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.698396e+02
## variance........ 8.499180e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.540072e+02
## variance........ 5.731064e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.536609e+02
## variance........ 3.986398e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.620811e+02
## variance........ 1.096153e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.940930e+02
## variance........ 1.281521e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.450759e+02
## variance........ 4.333648e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.914925e+02
## variance........ 2.024177e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.874787e+01
## variance........ 9.083623e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.528102e+01
## variance........ 3.302468e+03
## 
## GENERATION: 28
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 60, #Total UniqueCount: 1904
## var 1:
## best............ 4.196110e+02
## mean............ 4.124606e+02
## variance........ 2.882889e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.949855e+02
## variance........ 3.364116e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.830008e+02
## variance........ 2.630484e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.560402e+02
## variance........ 7.428482e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.567182e+02
## variance........ 1.439220e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.792267e+02
## variance........ 1.007591e+04
## var 7:
## best............ 4.941161e+02
## mean............ 4.954924e+02
## variance........ 2.953260e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.492306e+02
## variance........ 5.851675e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.921373e+02
## variance........ 1.173555e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.303891e+01
## variance........ 3.538065e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.368420e+01
## variance........ 4.616390e+03
## 
## GENERATION: 29
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 55, #Total UniqueCount: 1959
## var 1:
## best............ 4.196110e+02
## mean............ 4.200711e+02
## variance........ 2.427191e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.997977e+02
## variance........ 5.477578e+02
## var 3:
## best............ 9.908067e+02
## mean............ 9.813106e+02
## variance........ 2.080883e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.512605e+02
## variance........ 8.221133e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.542096e+02
## variance........ 4.935376e+02
## var 6:
## best............ 3.548777e+02
## mean............ 3.550716e+02
## variance........ 3.984443e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.953934e+02
## variance........ 4.593664e+02
## var 8:
## best............ 1.342969e+02
## mean............ 1.404784e+02
## variance........ 1.708162e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.896491e+02
## variance........ 3.159028e+03
## var 10:
## best............ 2.916871e+01
## mean............ 5.206840e+01
## variance........ 9.447515e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.709979e+01
## variance........ 5.531357e+03
## 
## GENERATION: 30
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 60, #Total UniqueCount: 2019
## var 1:
## best............ 4.196110e+02
## mean............ 4.271050e+02
## variance........ 2.378505e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.945800e+02
## variance........ 3.747911e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.627253e+02
## variance........ 1.191036e+04
## var 4:
## best............ 6.672423e+02
## mean............ 6.689994e+02
## variance........ 2.473197e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.598078e+02
## variance........ 1.563857e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.662736e+02
## variance........ 5.020689e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.969049e+02
## variance........ 8.671966e+02
## var 8:
## best............ 1.342969e+02
## mean............ 1.416362e+02
## variance........ 2.216345e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.010752e+02
## variance........ 3.531533e+03
## var 10:
## best............ 2.916871e+01
## mean............ 4.702358e+01
## variance........ 8.468537e+03
## var 11:
## best............ 1.016642e+00
## mean............ 1.766522e+01
## variance........ 4.615732e+03
## 
## GENERATION: 31
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 65, #Total UniqueCount: 2084
## var 1:
## best............ 4.196110e+02
## mean............ 4.204214e+02
## variance........ 3.080771e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.995598e+02
## variance........ 2.039817e+02
## var 3:
## best............ 9.908067e+02
## mean............ 9.863254e+02
## variance........ 3.399859e+02
## var 4:
## best............ 6.672423e+02
## mean............ 6.571844e+02
## variance........ 2.972057e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.549759e+02
## variance........ 7.595637e+02
## var 6:
## best............ 3.548777e+02
## mean............ 3.690335e+02
## variance........ 3.269625e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.858889e+02
## variance........ 3.894964e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.490857e+02
## variance........ 6.136912e+03
## var 9:
## best............ 3.933655e+02
## mean............ 3.992088e+02
## variance........ 3.403550e+03
## var 10:
## best............ 2.916871e+01
## mean............ 6.111549e+01
## variance........ 1.570517e+04
## var 11:
## best............ 1.016642e+00
## mean............ 2.150991e+01
## variance........ 8.859786e+03
## 
## GENERATION: 32
## Lexical Fit..... 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## #unique......... 56, #Total UniqueCount: 2140
## var 1:
## best............ 4.196110e+02
## mean............ 4.344496e+02
## variance........ 6.424515e+03
## var 2:
## best............ 7.018495e+02
## mean............ 6.923481e+02
## variance........ 2.761900e+03
## var 3:
## best............ 9.908067e+02
## mean............ 9.767283e+02
## variance........ 5.220314e+03
## var 4:
## best............ 6.672423e+02
## mean............ 6.600973e+02
## variance........ 2.634729e+03
## var 5:
## best............ 3.516812e+02
## mean............ 3.677753e+02
## variance........ 6.221432e+03
## var 6:
## best............ 3.548777e+02
## mean............ 3.604582e+02
## variance........ 1.312168e+03
## var 7:
## best............ 4.941161e+02
## mean............ 4.909629e+02
## variance........ 5.167207e+03
## var 8:
## best............ 1.342969e+02
## mean............ 1.482638e+02
## variance........ 6.645119e+03
## var 9:
## best............ 3.933655e+02
## mean............ 4.014486e+02
## variance........ 3.935956e+03
## var 10:
## best............ 2.916871e+01
## mean............ 3.076002e+01
## variance........ 1.663159e+02
## var 11:
## best............ 1.016642e+00
## mean............ 1.012200e+01
## variance........ 2.556098e+03
## 
## 'wait.generations' limit reached.
## No significant improvement in 10 generations.
## 
## Solution Lexical Fitness Value:
## 4.523096e-02  4.523096e-02  1.226742e-01  1.398751e-01  1.755850e-01  1.756690e-01  1.782038e-01  2.253242e-01  2.253242e-01  2.491206e-01  2.491206e-01  3.173110e-01  3.173110e-01  6.929341e-01  8.066981e-01  8.763888e-01  8.763888e-01  9.762244e-01  1.000000e+00  1.000000e+00  1.000000e+00  1.000000e+00  
## 
## Parameters at the Solution:
## 
##  X[ 1] : 4.196110e+02
##  X[ 2] : 7.018495e+02
##  X[ 3] : 9.908067e+02
##  X[ 4] : 6.672423e+02
##  X[ 5] : 3.516812e+02
##  X[ 6] : 3.548777e+02
##  X[ 7] : 4.941161e+02
##  X[ 8] : 1.342969e+02
##  X[ 9] : 3.933655e+02
##  X[10] : 2.916871e+01
##  X[11] : 1.016642e+00
## 
## Solution Found Generation 21
## Number of Generations Run 32
## 
## Sat Nov 29 10:46:39 2025
## Total run time : 0 hours 1 minutes and 41 seconds
mout <- Match(Y = Y, Tr = Tr, X = X, Weight.matrix = genout)
summary(mout)
## 
## Estimate...  893.5 
## AI SE......  746.83 
## T-stat.....  1.1964 
## p.val......  0.23155 
## 
## Original number of observations..............  1249 
## Original number of treated obs...............  601 
## Matched number of observations...............  601 
## Matched number of observations  (unweighted).  632

After dropping 199 rows with missing data, genetic matching was performed with pop.size=100, wait.generations=10, and max.generations=100.

TASK 4: Balance Assessment

bal <- MatchBalance(
  Tr ~ age + educ + nodegree + married + black + hisp +
       re75 + re74 + nchildren75 + zero74 + zero75,
  data = obs_data,
  match.out = mout,
  nboots = 500
)
## 
## ***** (V1) age *****
##                        Before Matching        After Matching
## mean treatment........     33.755             33.755 
## mean control..........     37.073             33.686 
## std mean diff.........    -44.861            0.94511 
## 
## mean raw eQQ diff.....     4.1265             0.9462 
## med  raw eQQ diff.....          4                  1 
## max  raw eQQ diff.....          9                  2 
## 
## mean eCDF diff........    0.11197           0.025573 
## med  eCDF diff........    0.10077           0.017405 
## max  eCDF diff........    0.23491           0.066456 
## 
## var ratio (Tr/Co).....    0.48896            0.84653 
## T-test p-value........ 1.5209e-10            0.69293 
## KS Bootstrap p-value.. < 2.22e-16              0.068 
## KS Naive p-value...... 2.2655e-15            0.12267 
## KS Statistic..........    0.23491           0.066456 
## 
## 
## ***** (V2) educ *****
##                        Before Matching        After Matching
## mean treatment........      10.29              10.29 
## mean control..........     11.304             10.329 
## std mean diff.........    -52.439            -2.0642 
## 
## mean raw eQQ diff.....     1.0849           0.093354 
## med  raw eQQ diff.....          1                  0 
## max  raw eQQ diff.....          5                  2 
## 
## mean eCDF diff........   0.057296          0.0051864 
## med  eCDF diff........  0.0098113          0.0031646 
## max  eCDF diff........    0.24834           0.026899 
## 
## var ratio (Tr/Co).....    0.48673              1.071 
## T-test p-value........ 9.3259e-14             0.1782 
## KS Bootstrap p-value.. < 2.22e-16               0.69 
## KS Naive p-value...... < 2.22e-16            0.97622 
## KS Statistic..........    0.24834           0.026899 
## 
## 
## ***** (V3) nodegree *****
##                        Before Matching        After Matching
## mean treatment........     0.7005             0.7005 
## mean control..........    0.45216             0.7005 
## std mean diff.........     54.173                  0 
## 
## mean raw eQQ diff.....    0.24958                  0 
## med  raw eQQ diff.....          0                  0 
## max  raw eQQ diff.....          1                  0 
## 
## mean eCDF diff........    0.12417                  0 
## med  eCDF diff........    0.12417                  0 
## max  eCDF diff........    0.24834                  0 
## 
## var ratio (Tr/Co).....    0.84706                  1 
## T-test p-value........ < 2.22e-16                  1 
## 
## 
## ***** (V4) married *****
##                        Before Matching        After Matching
## mean treatment........   0.021631           0.021631 
## mean control..........   0.020062           0.021631 
## std mean diff.........     1.0776                  0 
## 
## mean raw eQQ diff.....  0.0016639                  0 
## med  raw eQQ diff.....          0                  0 
## max  raw eQQ diff.....          1                  0 
## 
## mean eCDF diff........ 0.00078444                  0 
## med  eCDF diff........ 0.00078444                  0 
## max  eCDF diff........  0.0015689                  0 
## 
## var ratio (Tr/Co).....     1.0766                  1 
## T-test p-value........     0.8465                  1 
## 
## 
## ***** (V5) black *****
##                        Before Matching        After Matching
## mean treatment........    0.83694            0.83694 
## mean control..........    0.65432            0.83527 
## std mean diff.........     49.392            0.45003 
## 
## mean raw eQQ diff.....    0.18303          0.0015823 
## med  raw eQQ diff.....          0                  0 
## max  raw eQQ diff.....          1                  1 
## 
## mean eCDF diff........   0.091309         0.00079114 
## med  eCDF diff........   0.091309         0.00079114 
## max  eCDF diff........    0.18262          0.0015823 
## 
## var ratio (Tr/Co).....    0.60344            0.99187 
## T-test p-value........ 5.8176e-14            0.31731 
## 
## 
## ***** (V6) hisp *****
##                        Before Matching        After Matching
## mean treatment........    0.11481            0.11481 
## mean control..........   0.015432            0.10815 
## std mean diff.........     31.147              2.086 
## 
## mean raw eQQ diff.....   0.099834          0.0063291 
## med  raw eQQ diff.....          0                  0 
## max  raw eQQ diff.....          1                  1 
## 
## mean eCDF diff........   0.049688          0.0031646 
## med  eCDF diff........   0.049688          0.0031646 
## max  eCDF diff........   0.099377          0.0063291 
## 
## var ratio (Tr/Co).....     6.6895             1.0536 
## T-test p-value........ 1.9524e-12           0.045231 
## 
## 
## ***** (V7) re75 *****
##                        Before Matching        After Matching
## mean treatment........     860.61             860.61 
## mean control..........     7510.9             849.17 
## std mean diff.........    -331.85            0.57069 
## 
## mean raw eQQ diff.....     6616.5             86.734 
## med  raw eQQ diff.....     6086.1                  0 
## max  raw eQQ diff.....      31934              957.7 
## 
## mean eCDF diff........    0.37602           0.011907 
## med  eCDF diff........    0.45784           0.011076 
## max  eCDF diff........    0.51154           0.033228 
## 
## var ratio (Tr/Co).....   0.070615            0.93213 
## T-test p-value........ < 2.22e-16             0.8067 
## KS Bootstrap p-value.. < 2.22e-16              0.382 
## KS Naive p-value...... < 2.22e-16            0.87639 
## KS Statistic..........    0.51154           0.033228 
## 
## 
## ***** (V8) re74 *****
##                        Before Matching        After Matching
## mean treatment........     913.13             913.13 
## mean control..........       7509             987.69 
## std mean diff.........    -306.87            -3.4688 
## 
## mean raw eQQ diff.....     6566.3             100.13 
## med  raw eQQ diff.....     6383.6                  0 
## max  raw eQQ diff.....      25770             1591.8 
## 
## mean eCDF diff........    0.37515           0.011666 
## med  eCDF diff........    0.45187          0.0094937 
## max  eCDF diff........    0.52367           0.033228 
## 
## var ratio (Tr/Co).....   0.086785            0.92778 
## T-test p-value........ < 2.22e-16            0.17567 
## KS Bootstrap p-value.. < 2.22e-16              0.374 
## KS Naive p-value...... < 2.22e-16            0.87639 
## KS Statistic..........    0.52367           0.033228 
## 
## 
## ***** (V9) nchildren75 *****
##                        Before Matching        After Matching
## mean treatment........      2.183              2.183 
## mean control..........     1.7145             2.2196 
## std mean diff.........     36.222              -2.83 
## 
## mean raw eQQ diff.....    0.63894            0.10759 
## med  raw eQQ diff.....          1                  0 
## max  raw eQQ diff.....          3                  1 
## 
## mean eCDF diff........   0.063868           0.015371 
## med  eCDF diff........   0.017648          0.0047468 
## max  eCDF diff........    0.30208           0.064873 
## 
## var ratio (Tr/Co).....    0.52544             1.0171 
## T-test p-value........ 1.1139e-07            0.17558 
## KS Bootstrap p-value.. < 2.22e-16              0.022 
## KS Naive p-value...... < 2.22e-16            0.13988 
## KS Statistic..........    0.30208           0.064873 
## 
## 
## ***** (V10) zero74 *****
##                        Before Matching        After Matching
## mean treatment........    0.75042            0.75042 
## mean control..........       0.25            0.73544 
## std mean diff.........     115.53             3.4574 
## 
## mean raw eQQ diff.....    0.50083           0.014241 
## med  raw eQQ diff.....          1                  0 
## max  raw eQQ diff.....          1                  1 
## 
## mean eCDF diff........    0.25021          0.0071203 
## med  eCDF diff........    0.25021          0.0071203 
## max  eCDF diff........    0.50042           0.014241 
## 
## var ratio (Tr/Co).....    0.99901            0.96261 
## T-test p-value........ < 2.22e-16            0.24912 
## 
## 
## ***** (V11) zero75 *****
##                        Before Matching        After Matching
## mean treatment........    0.73211            0.73211 
## mean control..........    0.27623            0.75374 
## std mean diff.........     102.85            -4.8803 
## 
## mean raw eQQ diff.....    0.45591            0.02057 
## med  raw eQQ diff.....          0                  0 
## max  raw eQQ diff.....          1                  1 
## 
## mean eCDF diff........    0.22794           0.010285 
## med  eCDF diff........    0.22794           0.010285 
## max  eCDF diff........    0.45588            0.02057 
## 
## var ratio (Tr/Co).....    0.98108             1.0566 
## T-test p-value........ < 2.22e-16            0.22532 
## 
## 
## Before Matching Minimum p.value: < 2.22e-16 
## Variable Name(s): age educ nodegree re75 re74 nchildren75 zero74 zero75  Number(s): 1 2 3 7 8 9 10 11 
## 
## After Matching Minimum p.value: 0.022 
## Variable Name(s): nchildren75  Number(s): 9
covars <- c("age", "educ", "nodegree", "married", "black", "hisp",
            "re75", "re74", "nchildren75", "zero74", "zero75")

matched_t <- obs_data[mout$index.treated, ]
matched_c <- obs_data[mout$index.control, ]
after_pvals <- sapply(covars, function(v) {
  t.test(matched_t[[v]], matched_c[[v]])$p.value
})
names(after_pvals) <- covars

Balance Results:

print(round(after_pvals, 4))
##         age        educ    nodegree     married       black        hisp 
##      0.8479      0.7086      1.0000      1.0000      0.9383      0.7150 
##        re75        re74 nchildren75      zero74      zero75 
##      0.9229      0.5571      0.6013      0.5562      0.3953

The lowest p-value after matching is 0.3953, indicating improved covariate balance between treatment and control groups.

TASK 5: Treatment Effect Estimation

pair_diffs <- Y[mout$index.treated] - Y[mout$index.control]
n_pairs <- length(pair_diffs)

att_est <- mean(pair_diffs)
att_se  <- sd(pair_diffs) / sqrt(n_pairs)

ci_mult <- qt(0.975, df = n_pairs - 1)
ci_lower <- att_est - ci_mult * att_se
ci_upper <- att_est + ci_mult * att_se

Using 632 matched pairs, the estimated ATT is $898.75 with a standard error of $344.29. The 95% confidence interval is [$222.66, $1574.84].

TASK 6: Quantile Treatment Effects

matched_treated  <- obs_data[mout$index.treated, ]
matched_control  <- obs_data[mout$index.control, ]

matched_treated$treated  <- 1
matched_control$treated  <- 0

matched_data <- rbind(matched_treated, matched_control)

taus <- seq(0.1, 0.9, by = 0.1)

qte_est  <- numeric(length(taus))
qte_low  <- numeric(length(taus))
qte_high <- numeric(length(taus))

for (i in seq_along(taus)) {
  tau <- taus[i]
  rq_fit <- rq(re79 ~ treated, tau = tau, data = matched_data)
  rq_sum <- summary(rq_fit, se = "boot", R = 500)
  
  est <- rq_sum$coefficients["treated", "Value"]
  se  <- rq_sum$coefficients["treated", "Std. Error"]
  
  qte_est[i]  <- est
  qte_low[i]  <- est - 1.96 * se
  qte_high[i] <- est + 1.96 * se
}

qte_results <- data.frame(
  Quantile = taus,
  QTE = round(qte_est, 2),
  Lower_95CI = round(qte_low, 2),
  Upper_95CI = round(qte_high, 2),
  Significant = ifelse(qte_low > 0 | qte_high < 0, "Yes", "No")
)

Quantile Treatment Effects:

print(qte_results, row.names = FALSE)
##  Quantile     QTE Lower_95CI Upper_95CI Significant
##       0.1    0.00       0.00       0.00          No
##       0.2    0.00       0.00       0.00          No
##       0.3    0.00       0.00       0.00          No
##       0.4    0.00       0.00       0.00          No
##       0.5 1672.39     492.77    2852.01         Yes
##       0.6 4737.55    2940.58    6534.53         Yes
##       0.7 4586.21    2803.30    6369.11         Yes
##       0.8 3203.60    2225.26    4181.94         Yes
##       0.9  885.01    -683.65    2453.67          No

Key percentiles: 10th ($0), 25th ($0), 50th/median ($1672.39), 75th ($4586.21), 90th ($885.01). The range of $4737.55 suggests substantial heterogeneity across the earnings distribution.

plot(
  taus, qte_est, 
  type = "b", 
  pch = 19,
  col = "darkblue",
  lwd = 2,
  ylim = range(c(qte_low, qte_high, 0)),
  xlab = "Quantile (tau)", 
  ylab = "Quantile Treatment Effect ($)",
  main = "Quantile Treatment Effects with 95% Confidence Intervals",
  cex.main = 1.1,
  cex.lab = 1.0,
  las = 1
)

segments(taus, qte_low, taus, qte_high, lwd = 2, col = "steelblue")
abline(h = 0, lty = 2, col = "red", lwd = 1.5)
grid(col = "gray90")

legend("topright", 
       legend = c("QTE Estimate", "95% CI", "Zero Effect"),
       col = c("darkblue", "steelblue", "red"),
       lty = c(1, 1, 2),
       lwd = c(2, 2, 1.5),
       pch = c(19, NA, NA),
       cex = 0.9,
       bg = "white")