Home » Topics » General » data mismatches
data mismatches [message #3182] |
Sat, 01 November 2014 06:42 |
jinexoxo
Messages: 22 Registered: October 2014 Location: Laguna, Philippines
|
Member |
|
|
Hi!
I am using the Individual Recode dataset for Phil 2013. I encoded the code
table v044 v024
... using STATA. The frequency for woman selected and interviewed for domestic violence module in National Capital Region is 1403.
The result is different from Phil NDHS 2013 for violence against women with 1984 women.
Please help me how the NDHS Report was done.
Thank you ...
J. Amora
|
|
|
|
|
|
|
|
|
|
|
|
Re: data mismatches [message #3313 is a reply to message #3311] |
Thu, 20 November 2014 00:57 |
Trevor-DHS
Messages: 805 Registered: January 2013
|
Senior Member |
|
|
d105g is used when a general question about physical violence is asked, but the indicator for physical violence is not based on just this question, but on the responses to a number of questions. Below is example code to match the physical violence indicator:
gen PVever = (inrange(d105a, 1, 4) | inrange(d105b, 1, 4) | inrange(d105c, 1, 4) | ///
inrange(d105d, 1, 4) | inrange(d105e, 1, 4) | inrange(d105f, 1, 4) | ///
inrange(d105g, 1, 4) | inrange(d105j, 1, 4) | inrange(d130a, 1, 4) | d115y == 0 | d118y == 0)
|
|
|
|
|
Re: data mismatches [message #3319 is a reply to message #3317] |
Thu, 20 November 2014 10:02 |
Trevor-DHS
Messages: 805 Registered: January 2013
|
Senior Member |
|
|
The code I gave is for ever experienced physical violence and is used to match the data in the first column of table 15.1. I couldn't find where your numbers were coming from, but I now see that you are referring to the numbers in table 15.10 (please confirm that this is the table you are looking at), and that you are interested in spousal physical violence and not just any physical violence. Sorry, this was not clear at first.
First, I checked the code that I provided earlier and it works just fine for "ever experienced physical violence" matching table 15.1. Here is the Stata output:
. use "PHIR61FL.DTA", clear
.
. gen PVever = (inrange(d105a, 1, 4) | inrange(d105b, 1, 4) | inrange(d105c, 1, 4) | ///
> inrange(d105d, 1, 4) | inrange(d105e, 1, 4) | inrange(d105f, 1, 4) | ///
> inrange(d105g, 1, 4) | inrange(d105j, 1, 4) | inrange(d130a, 1, 4) | d115y == 0 | d118y == 0)
.
. tab PVever [iw=d005/1000000]
PVever | Freq. Percent Cum.
------------+-----------------------------------
0 | 8,814.2297 80.40 80.40
1 | 2,148.7701 19.60 100.00
------------+-----------------------------------
Total | 10,963 100.00
I don't get any error message, and I can't tell from your message where the error is. Did you copy the code or re-type it? If you re-typed it, perhaps one of the variables is mis-spelled or is incorrectly upper or lower case. I would check that first.
Second, to match table 15.10 you use almost the same code, but without some of the last few conditions, however, you should limit the code to ever married women as follows:
. gen PVever_spouse = (inrange(d105a, 1, 4) | inrange(d105b, 1, 4) | inrange(d105c, 1, 4) | ///
> inrange(d105d, 1, 4) | inrange(d105e, 1, 4) | inrange(d105f, 1, 4) | ///
> inrange(d105g, 1, 4) | inrange(d105j, 1, 4)) if v502 > 0
(5512 missing values generated)
.
. tab v024 PVever_spouse if v502>0 [iw=d005/1000000],row
+----------------+
| Key |
|----------------|
| frequency |
| row percentage |
+----------------+
| PVever_spouse
Region | 0 1 | Total
----------------------+----------------------+----------
National Capital Regi |987.791213 156.481776 | 1,144.273
| 86.32 13.68 | 100.00
----------------------+----------------------+----------
Cordillera Admin Regi | 99.587833 15.859699 |115.447532
| 86.26 13.74 | 100.00
----------------------+----------------------+----------
I - Ilocos Region |291.607249 45.173311 | 336.78056
| 86.59 13.41 | 100.00
----------------------+----------------------+----------
II - Cagayan Valley |212.098394 53.819234 |265.917628
| 79.76 20.24 | 100.00
----------------------+----------------------+----------
III - Central Luzon |698.653727 83.820854 |782.474581
| 89.29 10.71 | 100.00
----------------------+----------------------+----------
IVA - CALABARZON | 918.00612 99.513806 | 1,017.52
| 90.22 9.78 | 100.00
----------------------+----------------------+----------
IVB - MIMAROPA |141.750067 30.69048 |172.440547
| 82.20 17.80 | 100.00
----------------------+----------------------+----------
V - Bicol |305.319453 54.026097 | 359.34555
| 84.97 15.03 | 100.00
----------------------+----------------------+----------
VI - Western Visayas |396.651668 54.116535 |450.768203
| 87.99 12.01 | 100.00
----------------------+----------------------+----------
VII - Central Visayas |425.376509 43.214089 |468.590598
| 90.78 9.22 | 100.00
----------------------+----------------------+----------
VIII - Eastern Visaya |232.304843 41.147731 |273.452574
| 84.95 15.05 | 100.00
----------------------+----------------------+----------
IX - Zamboanga Penins |265.596913 38.752526 |304.349439
| 87.27 12.73 | 100.00
----------------------+----------------------+----------
X - Northern Mindanao |273.245834 47.268561 |320.514395
| 85.25 14.75 | 100.00
----------------------+----------------------+----------
XI - Davao |356.346056 57.555294 | 413.90135
| 86.09 13.91 | 100.00
----------------------+----------------------+----------
XII - SOCCSKSARGEN | 287.88012 51.42066 | 339.30078
| 84.85 15.15 | 100.00
----------------------+----------------------+----------
XIII - Caraga |168.792793 33.588978 |202.381771
| 83.40 16.60 | 100.00
----------------------+----------------------+----------
ARMM |206.651887 8.217312 |214.869199
| 96.18 3.82 | 100.00
----------------------+----------------------+----------
Total | 6,267.661 914.666943 | 7,182.328
| 87.27 12.73 | 100.00
|
|
|
|
|
|
|
|
Re: data mismatches [message #3525 is a reply to message #3352] |
Fri, 26 December 2014 03:57 |
jinexoxo
Messages: 22 Registered: October 2014 Location: Laguna, Philippines
|
Member |
|
|
Hi. Good day, sir!
I am now in the middle of an analysis. I thank you so much for always accommodating and answering all my questions.
I have another problem with my study.
I generated "wife experience physical violence for the last 12 mos" with this:gen victim = (inlist(d105a, 1, 2, 4) | inlist(d105b, 1, 2, 4) | inlist(d105c, 1, 2, 4) | inlist(d105d, 1, 2, 4) | inlist(d105e, 1, 2, 4) | inlist(d105f, 1, 2, 4) | inlist(d105g, 1, 2, 4) | inlist(d105j, 1, 2, 4)) if v502 >0 I recoded 0 as No and 1 as Yes.
Next, I drop some unnecessary observations: drop if v502 == 0
I tried to run a logistic regression with a single independent variable and I got this:
. [i]logistic victim v012 if v024 == 1 [iw=d005/1000000][/i]
Logistic regression Number of obs = 942
LR chi2(1) = 15.23
Prob > chi2 = 0.0001
Log likelihood = -215.9921 Pseudo R2 = 0.0341
------------------------------------------------------------ ------------------
victim | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+---------------------------------------------- ------------------
v012 | .9359899 .0163611 -3.78 0.000 .9044659 .9686127
_cons | .435881 .2389604 -1.51 0.130 .1488397 1.276489
------------------------------------------------------------ ------------------
Question: Why do I always get 942 observations when I actually used weights in the data? I expected that the number of observations would be 1144.
Again, thank you ... and merry Xmas! :)
J. Amora
|
|
|
|
|
|
|
|
|
|
Re: data mismatches [message #3540 is a reply to message #3539] |
Fri, 02 January 2015 03:18 |
jinexoxo
Messages: 22 Registered: October 2014 Location: Laguna, Philippines
|
Member |
|
|
Now, my partner and I can proceed to the last 2 chapters of our thesis. Thank you, sir! You're really a big help.
J. Amora
|
|
|
Goto Forum:
Current Time: Sat Jan 11 17:53:16 Coordinated Universal Time 2025
|