Antenatal care visits by type of facilities [message #25174] |
Thu, 08 September 2022 17:57 |
Aamna
Messages: 11 Registered: May 2019
|
Member |
|
|
Hello,
I am working on the Pakistan database (2017-2018). I am analyzing the type of facilities used by women for antenatal care. I am coding the m57 variable. I am combining them either as Private, Public, or Home. I have run the following codes but I have run into issues when I am doing regression analysis. The issue arise because some women who received antenatal care at home also visited public or private hospitals/clinics. I created a categorical variable with 3 categories (public, private, and home). In regression, home is my compersion group. In the results private is completely omitted. I do not understand where I have made the mistake. I have made changes in my codes but the problem does not resolve. The coding commands are as below. I can not understand where I am going wrong or what mistakes I have made in any way. Can you kindly help me in pointing out my mistake as well as help me with my codes? I really appreciate your help in this crucial time of mine (time sensitive due to deadlines).
Thank you
Aamna
**Ownership of Facilities (m57)
gen antenatalvisit_facility=0
foreach xvar of varlist m57a m57b m57e m57f m57g m57h m57l m57m m57n m57o m57p m57q m57s m57x{
replace antenatalvisit_facility=. if `xvar'==.
}
tab antenatalvisit_facility, mi
*Antenatal visit by private/govt/other facilities RECODE
gen antenatalvisit_public=antenatalvisit_facility
label var antenatalvisit_public "Public Facility Used For Antenatal Care Visits During Pregnancy"
label values antenatalvisit_public decision
foreach xvar of varlist m57e m57f m57g m57l {
replace antenatalvisit_public=1 if `xvar'==1 & `xvar'!= .
}
tab antenatalvisit_public, mi
gen antenatalvisit_private=antenatalvisit_facility
label var antenatalvisit_private "Private Facility Used For Antenatal Care Visits During Pregnancy"
label values antenatalvisit_private decision
foreach xvar of varlist m57m m57n m57h m57o m57p m57q m57s m57x{
replace antenatalvisit_private=1 if `xvar'==1 & `xvar'!= .
}
tab antenatalvisit_private, mi
gen antenatalvisit_home=antenatalvisit_facility
label var antenatalvisit_home "Home Used For Antenatal Care Visits During Pregnancy"
label values antenatalvisit_home decision
foreach xvar of varlist m57a m57b {
replace antenatalvisit_home=1 if `xvar'==1 & `xvar'!= .
}
tab antenatalvisit_home, mi
gen ownership=.
replace ownership=0 if antenatalvisit_home==1
replace ownership=1 if antenatalvisit_public==1
replace ownership=2 if antenatalvisit_private==1
label var ownership "Ownership of Facilities"
label values ownership ownership
tab ownership, mi
|
|
|
|
|
Re: Antenatal care visits by type of facilities [message #25230 is a reply to message #25198] |
Mon, 19 September 2022 16:28 |
Janet-DHS
Messages: 893 Registered: April 2022
|
Senior Member |
|
|
Following is a response from DHS staff member Tom Pullum:
I was using "local" notation to reduce the number of lines. The line "gen AN_home=0 if m57a_1<." arbitrarily picks the "a" type to determine which women have responses to any of the m57 types. All the types (a, b, etc.) have the same number of cases in their denominators, that is, the same number of cases who have any value other than NA, which is coded ".". The cases with numerical codes (0,1, 9) are identified with "<.". You could use any of the m57 options to determine this. In `ll', "l" is the 12th letter of the alphabet, not a number. It goes with "foreach ll" and is just the index for a loop. These are Stata operations than can simplify your life.
I see that I omitted a "label define" line. After inserting that, the last three lines should be
label define ANtype 0 "Home" 1 "Public" 2 "Private"
label values ANtype ANtype
tab ANtype, m
I then get the following UNWEIGHTED distribution:
Type of |
Facilities | Freq. Percent Cum.
------------+-----------------------------------
Home | 138 0.92 0.92
Public | 2,165 14.37 15.28
Private | 4,725 31.36 46.64
. | 8,040 53.36 100.00
------------+-----------------------------------
Total | 15,068 100.00
This distribution is for women who reported any ANC care for their most recent birth. The "." or NA category includes women who did not have a live birth in the past five years AND women who did have one but received no ANC for that birth. There is a hierarchy such that, if the woman had a combination of types that included "Private" she is classified as "Private". I don't know whether that's what you want to do, but with multiple-options variables such as this you have to impose a hierarchy on the options.
So far as the problem with your regression goes, I don't know how the outcome "antenataldetail" is coded. That outcome must be some kind of a scale for you to be using OLS regression. I am guessing that the scale is defined in such a way that it is very strongly associated with the private vs not private distinction. The model may be over-determined because of that--or perhaps some of the other variables in the model are strongly associated with ANtype. At any rate, you could simplify the model and see what happens to "private" when ANtype is the only predictor and then gradually add other predictors.
|
|
|
|