










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











accounting for the variation associated with known explanatory variables associated with both selection and outcome, the Heckman probit method assumes that each process is left with normally distributed errors. Possible correlation between selection and outcome is allowed by correlating these error terms. The Heckman probit estimation procedure simultaneously estimates the regression coefficients associated with the covariates explaining the selection and outcome processes and the value of correlation coefficient associated with the relationship between the error terms.
For the Heckman probit method to work well, there must be sets of explanatory variables associated with both selection and outcome, and optimally there should be one or more variables (the ‘selection’ variables) that only appear in the selection relationship. These selection variables should not affect the outcome. This yields two equations, one for selection that includes the selection variables, and one for the outcome: the ‘selection’ and ‘outcome’ equations.
There are standard procedures for estimating the biprobit Heckman selection model, and they strictly re- quire:
The biprobit Heckman selection model requires two strong assumptions, and in general it is not possible to test these assumptions using real data. Consequently we apply a simulation approach:
We are interested in testing the Heckman selection model correction procedure using data with a structure similar to that of real populations along important dimensions over which we know HIV prevalence changes. To keep things tractable we include sex and age and generate datasets with sex-age-specific HIV prevalence rates that are similar to those found in high HIV prevalence populations living in Southern Africa. We generate simulated data using a model analogous to the data generating process assumed by the Heckman probit method. We create a virtual population with a sex-age composition similar to a real population living in Southern Africa, and we infect the virtual people with HIV so that the sex-age profile of HIV prevalence matches that same real population.
3.1.1 Data Generating Preliminaries, Age & Sex
We start by creating a variable number of virtual people and assign them ages (continuous variable) to match the age structure of the Southern African population shown in Table 1. In an independent process we then assign sexes with 52% female and 48% male.
Table 1. Population Age Structure
Age Group Fraction of Population (%)
15-19 20. 20-24 17. 25-29 14. 30-34 11. 35-39 9. 40-44 7. 45-49 5. 50-54 4. 55-59 3. 60-64 3. 65+ 4.
3.1.2 Interviewer Variable
To model the interview and selection process we need a comparatively small number of interviewers to interview our virtual subjects. We want to test well-specified Heckman selection models and also break the assumptions underlying the model. Hence, variation in the ‘effectiveness’ of the interviewers can affect both the selection and outcome processes, only selection for simulated populations that fulfill the assumptions of the Heckman selection model, and both for populations that break those assumptions.
We randomly assign a variable number of interviewers to our virtual subjects. Each interviewer is assigned an ID I and given a random ‘interview effectiveness’ Ie drawn from a normal distribution with mean μIe = 1 and standard deviation σIe = 1. Variation in this effectiveness is allowed to affect the selection and outcome variables in flexible ways that allow us to explore the ability of the Heckman selection models to accurately correct estimates of HIV prevalence.
3.1.3 Selection Variable
The selection variable is constructed by working a probit model backward, starting with the linear predictor and ending up with a binary variable that indicates selection.
For individual j the value of the linear predictor of selection κ?j is
κ?j = zj γ + μsj
κ?j = ω + θ 1 (agej − 40)^2 + θ 2 [sexj = male]
where indicator variables are noted using Iverson’s bracket notation: [α] =
1 if α is true 0 if α is false
3.1.5 Correlated Errors
To create the type of relationship between selection and HIV status that the Heckman selection model is designed to identify and estimate, we correlate the error terms in the generating equations 1 and 4:
μs ∼ N (0, 1) (7)
μh ∼ N (0, 1) (8) corr(μs, μh) = ρ (9)
Consequently the probabilities of being selected and being HIV+ can be correlated with either sign and any magnitude – e.g. strong negative correlation implies that those who are selected are less likely to be HIV+ than those who are not, the worrying potential issue that motivates this work!
The simulation scenarios are organized as follows:
For each of the first four simulation scenarios – Base, Outcome Strong, Outcome Weak, Non-normal Squared, Non-normal Cubed & Sizes – we generate 500 datasets with 5,000 observations each for each parameter set. For these scenarios we vary the Heckman ρ and the degree of selection through ω. The degree of selection results in various fractions of the virtual populations being selected for observation – i.e. results in situations with varying numbers of unobserved individuals for whom the Heckman selection method must produce a predicted probability of being HIV positive. For the remaining scenario – Sizes – we generate 500 datasets with varying numbers of observations for a fixed intermediate level of selection.
To keep things manageable we vary the Heckman ρ over nine values − 0 .8(0.2)0. 81 and the level of selection over four values 0.5(1.0)3.5. This yields 36 combinations of ρ and ω for each the first five simulation scenarios, which in turn requires 18,000 individual datasets for each simulation scenario; 90,000 datasets in total for the first five simulation scenarios. For the last scenario Sizes, there are 20 combinations of ρ and sample size with a fixed level of selection. This creates 10,000 more datasets to bring the grand total to 100, datasets for the complete simulation investigation.
3.2.1 Base
The Base simulation scenario corresponds to a high HIV prevalence population that fulfills the assumptions of the Heckman selection model. There is a good selection variable, Interviewer ID, and conditional on the selection and outcome equations, the joint error distribution is bivariate Normal. This is the ‘base’ scenario because it represents everything working well and is used as the benchmark to which to compare all of the variously pathologic scenarios that follow.
(^1) At various points in the text and Table 2 sequences of values are specified using the notation s(i)e where s is the start value, i is the increment value used to generate consecutive values in an additive fashion (value(k+1) = valuek + i), and e is the end value – e.g. 4(2)8 corresponds to the sequence [4, 6 , 8].
3.2.2 Outcome Strong
In the Outcome Strong scenario, the selection variable Interviewer ID has a strong effect on the outcome variable HIV status. This is accomplished by adding terms to Equation 4 with values for coefficients δ 22 − 30 of 0. 25 × Ie. This creates a strong relationship between Interviewer ID and the probability of being HIV positive.
3.2.3 Outcome Weak
In the Outcome Weak scenario, the selection variable Interviewer ID has a weak effect on the outcome variable HIV status. The δ coefficients in Equation 4 have values of 0. 05 × Ie.
3.2.4 Non-normal Squared
In the Non-normal Squared scenario the conditional joint error distribution is distorted by squaring the error terms in the selection and outcome equations, Equations 7 and 8. This results in a joint distribution that is ‘bunched-up’ close to the origin for original error term values between -1 and 1 and greatly ‘expanded’ for original values with absolute value greater than 1. The whole distribution occupies the 1st^ quadrant of the Cartesian plane and is concentrated near the origin with a long ‘tail’ toward increasing positive values.
3.2.5 Non-normal Cubed
In the Non-normal Cubed scenario the conditional joint error distribution is distorted by cubing the error terms in the selection and outcome equations, Equations 7 and 8. This results in a joint distribution that is greatly condensed and expanded depending on the exact values of the original error terms, and the result occupies potentially all four quadrants of the Cartesian plane.
3.2.6 Sizes
The Sizes scenario is the same as the Base scenario with varying ‘sample sizes’, i.e. numbers of virtual individuals. Five sample sizes are tested: 100(2,500)10,100.
The specific parameter values used to generate datasets for each simulation scenario are listed in Tables 2 and 3.
Table 3.
Simulation Output Specifications Selection Affects
Outcome
Non-normal
Error Distribution
Coefficient
Variable
Base
Strong
Weak
Squared
Cubed
Sizes
HIV Status (Outcome)
λ^
constant
-1.
-1.
-1.
-1.
-1.
-1.
-na-
sex=female
-na-
-na-
-na-
-na-
-na-
-na-
δ^1
sex=male
-0.
-0.
-0.
-0.
-0.
-0.
-na-
age=15-
-na-
-na-
-na-
-na-
-na-
-na-
δ^2
age=20-
δ^3
age=25-
δ^4
age=30-
δ^5
age=35-
δ^6
age=40-
δ^7
age=45-
δ^8
age=50-
δ^9
age=55-
δ^10
age=60-
δ^11
age=65+
-na-
sex=male, age=15-
-na-
-na-
-na-
-na-
-na-
-na-
δ^12
sex=male, age=20-
-0.
-0.
-0.
-0.
-0.
-0.
δ^13
sex=male, age=25-
δ^14
sex=male, age=30-
δ^15
sex=male, age=35-
δ^16
sex=male, age=40-
δ^17
sex=male, age=45-
δ^18
sex=male, age=50-
δ^19
sex=male, age=55-
δ^20
sex=male, age=60-
δ^21
sex=male, age=65+
-na-
I=
-na-
-na-
-na-
-na-
-na-
-na-
δ^22
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^23
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^24
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^25
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^26
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^27
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^28
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^29
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
δ^30
I=
-na-
25
×
I e^
05
×
I e^
-na-
-na-
-na-
′ μ h
-na-
-na-
-na-
μ 2 h^
μ 3 h^
-na-
3.4.1 Real HIV Prevalence
Calculation of the real HIV prevalence for a virtual population is straightforward. The real HIV prevalence Hp is
Hp =
i=
[Hi = 1] (10)
where N is the total number of virtual individuals and Hi is the HIV status of individual i.
3.4.2 Corrected HIV Prevalence using the Heckman Selection Model
Calculation of the corrected HIV prevalence for a virtual population consists of two parts, one for selected (observed) individuals and another for individuals who are not selected (observed). For selected individuals the procedure is as above for the calculation of real HIV prevalence. For those who are not selected, we use the Heckman selection model to estimate their probability of being HIV positive, and then summarize that and combine it with the real prevalence among the selected population to arrive at the corrected prevalence for the entire population.
For each of the simulated datasets we estimate the biprobit Heckman selection model specified in Equation 11 for selection and Equation 12 for HIV status using the heckprob procedure in the statistical package Stata 11.2 with the options iterate(15) and difficult.
Pr([Si]|zi) = Φ(ηi? ) ηi? = Ω + Θ 1 [sexi = male]
Pr([Hi]|xi) = Φ(ηi) ηi = Λ + ∆ 1 [sexi = male]
The estimated ‘Heckman ρ’ R is R = corr(Ms, Mh) (13)
If an estimation attempt succeeds (converges on a high likelihood solution), we use Stata’s predict command with the options pmarg, p10, p11 and psel to generate and calculate the predicted values shown in Table
Corrected HIV prevalence Hpc is
Hpc =
∑^ n
i=
[Hi = 1] +
∑^ g
j=
P (H = 1|S = 0)j
where N is the total number of virtual individuals, n is the number of selected (observed) virtual individuals, and g is the number of virtual individuals who are not selected (observed); N = n + g. Hi is the HIV status of individual i and P (H = 1|S = 0) is calculated as in Table 4.
Panel 1 of Figure 1 displays results for the Base simulation scenario in which all of the Heckman selection model assumptions are valid. The magnitude of the proportional error never exceeds 0.4 percent, and there is little variation with the fraction of individuals who were not selected to test. There is some variation with the Heckman ρ such that there is a consistent bias toward slightly underestimating the true value of HIV prevalence when the absolute value of the Heckman ρ is small – roughly -0.5 to 0.5.
There is substantial variation in the fraction of estimation attempts that fail in the Base simulation scenario, see Table 5. The percent estimation failures increases dramatically as the fraction of individuals not selected increases and the Heckman ρ decreases toward -0.8. At the extreme values of these parameters, almost half of the estimation attempts fail – 47.4 percent.
Panel 2 of Figure 1 displays results for the Outcome Strong simulation scenario. This scenario models a strong effect of the selection variable on the outcome. The Heckman selection correction procedure performs very badly in this scenario. The magnitude of the proportional error is never less than 5 percent and reaches 20 percent for some parameter sets. As expected, the direction of the error is always positive because this effect is modeled with positive coefficients δ 22 − 30 so that the selection variable has a positive effect on the outcome – i.e. increases the probability of being HIV positive. There is a clear deterioration in the correction procedure as the fraction of individuals not selected for testing increases, or as the percent missing goes up. Performance is slightly better for extreme values of the Heckman ρ in all cases.
Most of the estimation attempts succeed for this simulation scenario, see Table 5. The largest fraction of failures occur for highly negative values of the Heckman ρ and extreme values of the percent of individuals not selected for testing.
Panel 3 of Figure 1 displays results for the Outcome Weak simulation scenario. This scenario models a weak effect of the selection variable on the outcome. The results for this scenario are very similar to the Outcome Strong scenario, with magnitudes that are about 1/ 5 th^ of that in the Outcome Strong scenario. This suggests a linear relationship between the value of the parameters that model this effect and the outcome. Parameters δ 22 − 30 in the Outcome Strong scenario are 5× the corresponding values in the Outcome Weak scenario.
Most of the estimation attempts succeed for this simulation scenario, see Table 5. The largest fraction of failures occur for highly negative values of the Heckman ρ and extreme values of the percent of individuals not selected for testing.
Panel 4 of Figure 1 displays results for the Non-normal Squared simulation scenario. This scenario models a violation of the requirement that the conditional error distribution be bivariate Normal. The correction procedure performs well in spite of the distorted error distribution; the magnitude of the proportional error is never more than 0.8 of a percent. However, in this scenario all of the errors are negative and underestimate prevalence. The errors become worse in a symmetric way as the magnitude of the Heckman ρ increases and as the fraction of individuals not selected increases.
Very few estimation attempts fail in this scenario, see Table 5. The largest fractions failing are found when few individuals are not selected for testing and this fraction never exceeds 5.5 percent.
Panel 5 of Figure 1 displays results for the Non-normal Cubed simulation scenario. This scenario models a different violation of the requirement that the conditional error distribution be bivariate Normal. The results are similar to the Non-normal Squared scenario but worse. Again the errors are consistently negative, but in this case the magnitude reaches 7 percent in the worst case. The symmetry seen for the Non-normal Squared scenario is not observed for this scenario. The errors are worse all around but much worse for negative values of the Heckman ρ. In contrast, there is less variation in the magnitude of the error as the fraction of individuals not selected for testing changes.
Almost a third of the estimation attempts fail for some parameter sets in this scenario, and there is a strong pattern in the failure profile with Heckman ρ and fraction of individuals not selected to test, see Table 5. The fraction of failures is low when both are moderate and increase rapidly as the Heckman ρ decreases away from 0 and the fraction individuals not selected increases and as the Heckman ρ increases from 0 and the fraction of individuals not selected decreases.
Figure 2 displays results for the Sizes simulation scenario. This scenario investigates what happens at the ‘sample size’ changes. This is accomplished by varying the number of virtual individuals in the simulated datasets. The parameter values used in this scenario are the same as for the Base scenario except the fraction of individuals not selected for testing is fixed at an intermediate value. Not surprisingly, the results are very similar to the Base scenario for all sample sizes except the smallest, 100. When the sample was only 100 the method essentially failed and produced large errors that are strongly related to the value of the Heckman ρ.
The fraction of estimation attempts that fail in this scenario is also very similar to the Base scenario except when the sample size is 100, and in that case virtually all estimation attempts fail, see Table 5.
This investigation used a simulation approach to test the Heckman selection model correction procedure designed to identify and correct for selection effects in sample surveys used to estimate HIV prevalence. The main results are very clear:
The results from the Base simulation scenario demonstrate how well the procedure functions when the conditional error structure is bivariate Normal and the selection variables do not affect the outcome at all. Results from the Outcome simulation scenarios demonstrate that the method is essentially useless if the selection variable affects the outcome even a little bit. Likewise, the Non-normal scenarios reveal that the shape of the conditional error distribution matters a lot.
Figure 1. Mean Proportional Error between Corrected and True HIV Prevalence by Heckman ρ and Fraction of Individuals not Selected. Each point is the mean of values from 500 simulations, each with 5,000 virtual individuals. Simulation scenarios numbered 1- and named as in text.
−.
−.
−.
−.
0
.
.
Mean Proportional Error (%) −.8 −.6 −.4 −.2 0 .2 .4 .6. Heckman ρ 39% missing 28% missing 19% missing 12% missing
0
5
10
15
20
−.8 −.6 −.4 −.2 0 .2 .4 .6. Heckman ρ 39% missing 28% missing 19% missing 12% missing
0
1
2
3
4
Mean Proportional Error (%) −.8 −.6 −.4 −.2 0 .2 .4 .6. Heckman ρ 39% missing 28% missing 19% missing 12% missing
−.
−.
−.
−.
0
.
−.8 −.6 −.4 −.2 0 .2 .4 .6. Heckman ρ 29% missing 20% missing 12% missing 7% missing
−
−
−
−
−
−
−
0
Mean Proportional Error (%) −.8 −.6 −.4 −.2 0 .2 .4 .6. Heckman ρ 40% missing 30% missing 22% missing 15% missing
Figure 2. Mean Proportional Error between Corrected and True HIV Prevalence by Heckman ρ and Number of Virtual Individuals in the Sample. Each point is the mean of values from 500 simulations, each with varying number of virtual individuals. This is the Sizes simulation scenario. The left panel ‘With 100 Virtual Individuals’ displays all of the results; the right panel ‘Without 100 Virtual Individuals’ removes results from the simulation with 100 virtual individuals to expand the y-axis to reveal detail from the other levels of the sample size variable.
−
−
0
5
10
Mean Proportional Error (%)
−.8 −.6 −.4 −.2 0 .2 .4 .6. Heckman ρ 100 Inds. 2,600 Inds. 5,100 Inds. 7,600 Inds. 10,100 Inds.
With 100 Virtual Individuals
−.
0
.
.
.
.
−.8 −.6 −.4 −.2 0 .2 .4 .6. Heckman ρ 2,600 Inds. 5,100 Inds. 7,600 Inds. 10,100 Inds.
Without 100 Virtual Individuals
In general it is not possible to definitely test real data to determine if either of these assumptions is valid. The shape of the error distribution is only revealed through the estimation process, and is a sensitive function of the variables included in the selection and outcome equations. If some of the variables affecting selection and outcome are missing, then it will by definition be impossible to properly characterize the conditional error distribution, and since no survey will every have all the variables affecting either, it is purely a matter of story telling to ascertain how close to conditionally Normal the error distribution is.
Likewise, it is not possible in a general sense to be sure that selection variables are not related to the outcome, and as the Outcome Weak scenario makes clear, even a weak association is enough to produce systematically incorrect results with large magnitude.
Given these results, our advice is: