The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » Merging Aggregate Group Data with V613 Responses (Persisten Problems when merging data frames)
Merging Aggregate Group Data with V613 Responses [message #28316] Tue, 12 December 2023 16:17
JonKoch is currently offline  JonKoch
Messages: 10
Registered: September 2023
Member
Hello there,

For my thesis, I wanted to create aggregate data frames that list the percentage of polygynous unions by region (V024), religious group (V130) and ethnic group (V131) in order to gain insight as to whether those levels influence individual ideal family size/IFS (V613).

I managed to create the aggregate data frames for every category, but whenever I try to merge them into one coherent frame where all the rows are individual IFS respondents and and columns the aggregate labels, strange things start happening. Unprompted columns (named NA.1,2,3,..) pop up, unprompted calculations appear to happen with the values, and so on.

I think I might be overlooking some sort of issue with the data types, but I'm at a loss and stuck with this problem for a week now.

In case anyone has insight into R programming, I'll attach two of my script files, the latter one of which is a simplified version. That one did work out slightly better, but only just.

If anybody has an idea about how the creation of the regression frame could be accomplished, I would be immensely grateful.

[Updated on: Tue, 12 December 2023 16:19]

Report message to a moderator

Previous Topic: KDHS 2022: Table 11.12 Micronutrient supplementation and deworming among children
Next Topic: KDHS 2022 : Table 11.13.1 Nutritional status of women age 2049
Goto Forum:
  


Current Time: Sat Apr 27 01:47:38 Coordinated Universal Time 2024