The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » Road traffic accident (generating number of deaths by type of road traffic accident)
Road traffic accident [message #27842] Tue, 10 October 2023 01:54 Go to next message
sharad ghimire is currently offline  sharad ghimire
Messages: 2
Registered: October 2023
Member
I am analyzing road traffic accident from NDHS 2022. I am using household member data for this analysis. I wanted to generate number of deaths by type of road traffic accidents but there is no observation in the variable hai8 (death related to the accident). I would request for necessary guidance to merge the death related to road traffic accident from household file to the household member file?

Thank you,

Sharad
Re: Road traffic accident [message #27863 is a reply to message #27842] Fri, 13 October 2023 13:35 Go to previous messageGo to next message
Janet-DHS is currently offline  Janet-DHS
Messages: 893
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

I can't tell how far you were able to get with the construction of a data file. Below I will paste Stata lines to do this and then to merge with the PR file.

* Nepal 2022
* Analyze the accidents and injuries data in the HR file

use "...NPHR82FL.DTA", clear

keep hv0* hai*_*
drop *idx
describe hai*_1

* There are many hai variables; here is a way to itemize them for the reshape long command

local lnum 1 2 3 4 5 6 7 8 10 11 12 13o 13p
scalar ss=" "
foreach ll of local lnum {
scalar ss=ss+"hai`ll'_ "
}

local llet a b c d e f g h i j k l m n x z
scalar s9=" "
scalar s13=" "
foreach ll of local llet {
scalar s9=s9+"hai9`ll'_ "
scalar s13=s13+"hai13`ll'_ "
}

scalar list ss s9 s13
local ls=ss
local l9=s9
local l13=s13

reshape long `ls' `l9' `l13', i(hv001 hv002) j(event)
rename *_ *
tab hai1,m
drop if hai1==.

* This does not keep the variable labels
label variable hai1 "accident type"
label variable hai8 "death related to the accident"
tab hai1 hai8,m

label variable hai10 "line number"

* specify a workspace
cd e:\DHS\DHS_data\scratch

* Merge the accidents with the PR file
gen cluster=hv001
gen hh=hv002
gen line=hai10
sort cluster hh line

save temp.dta, replace
use "...NPPR82FL.DTA", clear
gen cluster=hv001
gen hh=hv002
gen line=hvidx
sort cluster hh line
merge cluster hh line using temp.dta
tab _merge

I have not seen these variables included in any other DHS survey and am not sure of the interpretation. It appears that there are only 7 (unweighted) deaths from traffic accidents during the reference period for the questions.

In the merge with the PR file, note that hai10 is NA (a dot) for people who died or are no longer in the household, and it is possible for more than one accident/injury to happen to a person. Let us know if you have other questions.

Re: Road traffic accident [message #27867 is a reply to message #27863] Sat, 14 October 2023 12:30 Go to previous message
sharad ghimire is currently offline  sharad ghimire
Messages: 2
Registered: October 2023
Member
Dear Sir/Madam,

Thank you very much for providing the stata code to merge household and household member files. I had applied the code and it work well. Out of total 32 accident related deaths, 7 were associated with the traffic accidents but none of them were related to motorcycle accidents.

With best regards,

Sharad Kumar Sharma

[Updated on: Thu, 19 October 2023 03:17]

Report message to a moderator

Previous Topic: PNC within 2 days
Next Topic: Merge IR and MR file DHS 2022 Nepal
Goto Forum:
  


Current Time: Fri Nov 29 03:59:18 Coordinated Universal Time 2024