The DHS Program User Forum      
Discussions regarding The DHS Program data and results
Home » Topics » General » Reproducing Haiti Net School Attendance Rates
Reproducing Haiti Net School Attendance Rates [message #11949] Sat, 11 March 2017 17:39 Go to next message
bk-Berkeley is currently offline  bk-Berkeley
Messages: 5
Registered: March 2017
Location: Berkeley, CA
I'd like to do differential analysis of Net School Attendance Rates on Haiti from the 1995, 2000, 2006, and 2012 data sets (I'm specifically using HTPR31FL.DTA, HTPR42FL.dta, HTPR52FL.DTA, HTPR61FL.DTA). However, I am calculating very different values even at the national level than I get when I use the STATcompiler or when looking at the respective reports.

See attached for a screen shot from STATcompiler.

I've looked over the forum and found this posting which deals with a similar issue ( mp;), but when I run the code provided there I am still not able to reproduce the numbers STATcompiler is reporting. The greatest divergence is in 2006 where I'm getting about 80% and STATcompiler is reporting about 50%.

The most straightforward code I'm running is in STATA:

gen wgt=hv005/1000000
tab hv121 if inrange(hv105,5,12) [iw=wgt]

Any assistance would be much appreciated! I want to make sure I'm looking at the right specification before digging down into lower administrative levels.

Re: Reproducing Haiti Net School Attendance Rates [message #12000 is a reply to message #11949] Fri, 17 March 2017 10:41 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 1200
Registered: February 2013
Senior Member
Following is a response from DHS Senior Research Associate, Lindsay Mallick:

A similar issue was addressed on the forum in Feb 2013. See mp;#page_top, which provides some Stata code written by Kerry MacQuarrie that explains the coding process for these variables. Applying that code to the Haiti 2006 dataset, the percentages do indeed match statcompiler and the final report. The problem with your code is in the use of hv121 (member attended school in the current year) rather than hv122 (education level during current school year). You should re-run using hv122 instead of hv121. Please let us know if this does not work. You can also look at the new video on matching DHS tables: dTWCazURy4CT .

Re: Reproducing Haiti Net School Attendance Rates [message #12026 is a reply to message #12000] Tue, 21 March 2017 03:26 Go to previous messageGo to next message
bk-Berkeley is currently offline  bk-Berkeley
Messages: 5
Registered: March 2017
Location: Berkeley, CA
Thank you for the assistance!

1) 2000 and 2006

If I make the following adjustments to Kerry MacQuarrie Stata code: 1) change hv121 to hv122 (per your instructions) and 2) change the range from 5,12 to 6,11 (since inrange is inclusive).

I get mostly the same, though some are off by as much as one percentage point of the numbers provided from StatCompiler for both 2006 and 2000 at the Departement and national levels. I'm not sure why I'm still not able to match perfectly and any additional suggestions would be most welcome!

The new code looks like:
tab hv122 hv024 if inrange(hv105,6,11) [iw=wgt], col

2) 2012

In addition, I've also noticed that the StatCompiler numbers for 2012 are different then the "Taux net de fréquentation scolaire" in the 2012 final report itself (see screen shot attached from page 29). What is the difference in how these two measurements are being calculated?

In terms of matching the StatCompiler, I've not been successful, however, the following gets very close (though again still not matching) for the attached screenshot:

tab hv122 shregnew if inrange(hml16,6,11) [iw=wgt], col

So additional help here would be appreciated.

3) 1995

Finally, when looking at 1995, we no longer have the hv122 variable. I'm wondering if using hv110 is appropriate? This is what that looks like:

tab hv110 shdepart if inrange(hv105,6,11) [iw=wgt], col

Again, many thanks!

Re: Reproducing Haiti Net School Attendance Rates [message #12059 is a reply to message #12026] Fri, 24 March 2017 09:12 Go to previous message
Messages: 1123
Registered: February 2013
Senior Member
Dear User, We are still looking into this but here is what we have found so far. From technical expert, Mr. Han Raggers:

Regarding point 2 below:

If I run the original survey application I do match the NAR for primary and secondary with the STATcompiler data. Also the GAR for secondary is the same. The only difference I see is for the GAR for primary. The reason being that the SC standardizes on ages 5-24 for this table, while Haiti used 6-24.

It also means that there may be something wrong with the report table 2.10, p. 29, for 2012.

It will be hard to replicate this tables in STATA since we impute for missing age at beginning of the school year. For that we use a seed generator. Even running this table with newer versions of CSPro will give slightly different results because the seed generator changed in version 6.0 of CSPro (I think).

I attach the table as it is produced by the survey application (defacto 6-24, primary school age 6:24 and secondary school age 12:17).




Some notes on point 3 below:

Indeed based upon HV110 for defacto population 6-24 as in:

box hhage => hhage5;   // hhage comes from HV105
           6-10 => 0;
          11-15 => 1;
          16-20 => 3;
          21-24 => 4;
                => notappl;
      hv025w = HV025;
      if !special(hhage5) then       // ie not not applicable
        t = xtab(t205, rweight);     // this is the general population
        if HV110(i) = 1 then
          t = xtab(t205w, rweight);  // this is the school attending population


at the end of the run one divides the school attending population by the general population (as in t205 = t205w * 100 / t205).
With this one should be able to match the 1994 report.


  • Attachment: T213.doc
    (Size: 92.00KB, Downloaded 55 times)
Previous Topic: socioeconomic factors affecting access to safe drinking water in Zambia
Next Topic: 2014 Kenya DHS province or county
Goto Forum:

Current Time: Tue Jan 23 22:35:56 Eastern Standard Time 2018