The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Ghana DHS 2022 (Immunisation)
Ghana DHS 2022 [message #30437] Fri, 29 November 2024 13:04 Go to next message
May is currently offline  May
Messages: 3
Registered: October 2024
Member
Hello DHS,

I used the syntax provided by the DHS to compute the fully immunised variable but my logistic regression analysis is not classifying the cases correctly. Is anyone able to look at the syntax below and give me some advice please?


COMPUTE DPT1hrecodedhs=(H3 >= 1 & H3 <= 3).
EXECUTE.
COMPUTE DPT2hrecodedhs=(H5 >= 1 & H5 <= 3).
EXECUTE.
COMPUTE DPT3hrecodedhs=(H7 >= 1 & H7 <= 3).
EXECUTE.
COMPUTE Polio1hrecodedhs=(H4 >= 1 & H4 <= 3).
EXECUTE.
COMPUTE Polio2hrecodedhs=(H6 >= 1 & H6 <= 3).
EXECUTE.
COMPUTE Polio3hrecodedhs=(H8 >= 1 & H8 <= 3).
EXECUTE.

COUNT Fullyimmunised=BCG1recodedhs DPT1hrecodedhs DPT2hrecodedhs DPT3hrecodedhs Polio1hrecodedhs
Polio2hrecodedhs Polio3hrecodedhs Measleshrecodedhs(1).
VARIABLE LABELS Fullyimmunised 'Fullyimmunised'.
EXECUTE.
COMPUTE Fullyimmunisedcomputed=Fullyimmunised = 8.
EXECUTE.
Re: Ghana DHS 2022 [message #30472 is a reply to message #30437] Wed, 04 December 2024 14:44 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 911
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

In what you listed, you don't include checks for BCG and Measles. Was that just a copying accident?

If you checked for all 8, you should match the column headed "Fully vaccinated (basic antigens)" in table 10.4. Is that what you are trying to match, and do you not get a match?
Re: Ghana DHS 2022 [message #30473 is a reply to message #30472] Wed, 04 December 2024 16:20 Go to previous messageGo to next message
May is currently offline  May
Messages: 3
Registered: October 2024
Member
Dear Tom,

Thank you for your response. I am trying to compute the fully immunised variable. I wonder if you could help me with the syntax for this variable, please?
Re: Ghana DHS 2022 [message #30499 is a reply to message #30473] Tue, 10 December 2024 10:01 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 911
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:
The code below is in Stata but you can convert it to SPSS. It matches the table for the totals row and the wealth quintiles. I suspect that you were not using weights. All results in the final reports are weighted. Also the denominator must be limited to living children (b5=1).
use "...GHKR8BFL.DTA", clear

* BCG: h2; DPT: h3 h5 h7; Polio: h4 h6 h8; Measles: h9
* vaccinated if code is 1 or 2 or 3

forvalues lv=2/9 {
gen h`lv'r=1 if h`lv'>=1 & h`lv'<=3
}

gen fully=0 if b5==1 & b19>11 & b19<24
replace fully=1 if fully==0 & h2r==1 & h3r==1 & h4r==1 & h5r==1 & h6r==1 & h7r==1 & h8r==1 & h9r==1

tab v190 fully [iweight=v005/1000000] , row
Re: Ghana DHS 2022 [message #30501 is a reply to message #30499] Wed, 11 December 2024 02:11 Go to previous messageGo to next message
May is currently offline  May
Messages: 3
Registered: October 2024
Member
Dear Tom,

Thank you for the code in Stata. Is it possible to get the code in SPSS, please. I do not understand why b5 and b19 are included in the Stata code. I look forward to hearing from you.

Kind regards,
May
Re: Ghana DHS 2022 [message #30521 is a reply to message #30501] Fri, 13 December 2024 13:19 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 911
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

The line "gen b5=0 if...." Specifies the cases for which the indicator is to be calculated. "b5==1" requires that the children are alive at the time of the survey. (Children who have died are included in the KR file but the indicator does not include them.) Then the further condition "b19>11 & b19<24" requires that the age of the child is 12 to 23 months. That requirement is specified in the title of the table.

I do not use SPSS and cannot translate into it. The first few lines in Stata just construct a set of variables such as h2r, which is a revised version of h2 that is coded h2r=1 if h2 is in the range 2 to 3; similarly for the other "h" variables. Your program did much the same thing, but with more descriptive variable names and it did not include BCG and Measles. You can figure out the rest.
Previous Topic: ARI data and commands in STATA
Goto Forum:
  


Current Time: Wed Dec 25 03:04:11 Coordinated Universal Time 2024