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)
Re: Road traffic accident [message #27863 is a reply to message #27842] Fri, 13 October 2023 13:35 Go to previous messageGo to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 888
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.

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


Current Time: Mon Nov 25 16:18:51 Coordinated Universal Time 2024