Support #2321
openlinking responsible adult to youth
80%
Description
Hi,
I am linking youth data from Wave 13 to Wave 15 and would also like to link each young person to their Wave 13 responsible adult in order to incorporate parent-level variables (e.g. mental health) when examining youth outcomes at Wave 15.
I can see that a responsible adult PNO is provided in the youth files, but I am unsure how this corresponds to the adult identifiers in the indresp dataset. Could you please advise on how the responsible adult PNO can be used to correctly link to the relevant adult records so that the appropriate parent-level information can be merged with the youth dataset?
Thank you!
Akansha
Files
Updated by Understanding Society User Support Team 25 days ago
- Category set to Data management
- Status changed from New to Feedback
- % Done changed from 0 to 80
- Private changed from Yes to No
Hi Akansha,
To link youth to themselves across waves, use their PIDP. To link to their parents, the easiest way is to use the identifiers of parents available in the youth file based on PIDP:
o_fnpid — Natural father: PIDP
o_mnpid — Natural mother: PIDP
o_pn1pid — Natural parent 1: PIDP
o_pn2pid — Natural parent 2: PIDP
o_pns1pid — Nat/step/adopt parent 1: PIDP
o_pns2pid — Nat/step/adopt parent 2: PIDP
For each youth respondent, this variable gives you their parent’s PIDP.
For example, if there was a youth respondent identified by PIDP=234572 in Wave 15, then in Wave 13 this PIDP=234572 identifies the same youth respondent/child (in any relevant file, not only w_youth, of course assuming that they were enumerated and completed a given interview in this wave). If, for this youth respondent (PIDP=234572), o_fnpid=98890, then this means that the respondent identified by PIDP=98890 is their natural father; this will apply to any other individual-level file, not only indresp (again, subject to their participation, eligibility and interview completion).
To learn more about linking household members, I recommend:
1. checking worksheets 7 and 8 in our Moodle course (https://www.understandingsociety.ac.uk/help/training/introduction-to-understanding-society-self-paced-moodle/
),
2. checking this forum for similar questions, as some of these include syntax files posted by us and may be useful,
3. checking our syntax website (https://www.understandingsociety.ac.uk/documentation/mainstage/syntax/
), particularly “Matching individuals within a household” and “Matching co-resident parents’ information”
I hope this helps,
Best wishes,
Piotr Marzec
UKHLS User Support
Updated by Akansha Naraindas 25 days ago
Thanks for this! My issue is that i want to use the https://www.understandingsociety.ac.uk/documentation/innovation-panel/variables/adresp15_dv/ 'responsible adult' variable to identify which of the parents are responsible for the children in the 'youth' dataset. I am unsure how to interpret this variable as im unsure what the person numbers correspond to
so basically im unsure how to link the youth to the 'responsible adult'
Understanding Society User Support Team wrote in #note-1:
Hi Akansha,
To link youth to themselves across waves, use their PIDP. To link to their parents, the easiest way is to use the identifiers of parents available in the youth file based on PIDP:
o_fnpid — Natural father: PIDP
o_mnpid — Natural mother: PIDP
o_pn1pid — Natural parent 1: PIDP
o_pn2pid — Natural parent 2: PIDP
o_pns1pid — Nat/step/adopt parent 1: PIDP
o_pns2pid — Nat/step/adopt parent 2: PIDPFor each youth respondent, this variable gives you their parent’s PIDP.
For example, if there was a youth respondent identified by PIDP=234572 in Wave 15, then in Wave 13 this PIDP=234572 identifies the same youth respondent/child (in any relevant file, not only w_youth, of course assuming that they were enumerated and completed a given interview in this wave). If, for this youth respondent (PIDP=234572), o_fnpid=98890, then this means that the respondent identified by PIDP=98890 is their natural father; this will apply to any other individual-level file, not only indresp (again, subject to their participation, eligibility and interview completion).To learn more about linking household members, I recommend:
1. checking worksheets 7 and 8 in our Moodle course (https://www.understandingsociety.ac.uk/help/training/introduction-to-understanding-society-self-paced-moodle/
),2. checking this forum for similar questions, as some of these include syntax files posted by us and may be useful,
3. checking our syntax website (https://www.understandingsociety.ac.uk/documentation/mainstage/syntax/
), particularly “Matching individuals within a household” and “Matching co-resident parents’ information”I hope this helps,
Best wishes,
Piotr Marzec
UKHLS User Support
Understanding Society User Support Team wrote in #note-1:
Hi Akansha,
To link youth to themselves across waves, use their PIDP. To link to their parents, the easiest way is to use the identifiers of parents available in the youth file based on PIDP:
o_fnpid — Natural father: PIDP
o_mnpid — Natural mother: PIDP
o_pn1pid — Natural parent 1: PIDP
o_pn2pid — Natural parent 2: PIDP
o_pns1pid — Nat/step/adopt parent 1: PIDP
o_pns2pid — Nat/step/adopt parent 2: PIDPFor each youth respondent, this variable gives you their parent’s PIDP.
For example, if there was a youth respondent identified by PIDP=234572 in Wave 15, then in Wave 13 this PIDP=234572 identifies the same youth respondent/child (in any relevant file, not only w_youth, of course assuming that they were enumerated and completed a given interview in this wave). If, for this youth respondent (PIDP=234572), o_fnpid=98890, then this means that the respondent identified by PIDP=98890 is their natural father; this will apply to any other individual-level file, not only indresp (again, subject to their participation, eligibility and interview completion).To learn more about linking household members, I recommend:
1. checking worksheets 7 and 8 in our Moodle course (https://www.understandingsociety.ac.uk/help/training/introduction-to-understanding-society-self-paced-moodle/
),2. checking this forum for similar questions, as some of these include syntax files posted by us and may be useful,
3. checking our syntax website (https://www.understandingsociety.ac.uk/documentation/mainstage/syntax/
), particularly “Matching individuals within a household” and “Matching co-resident parents’ information”I hope this helps,
Best wishes,
Piotr Marzec
UKHLS User Support
Updated by Understanding Society User Support Team 24 days ago
- File adresp15_dv.txt adresp15_dv.txt added
Hi Akansha,
I see. Adresp15_dv give you the person number of person responsible for child under 16, that is, their PNO variable value. PNO in combination with HIDP can be used as a unique identifier within one wave. You can also easily get the PIDP of each person knowing the combination of their PNO and HIDP. A simple R code doing such a merge which links the responsible adult highest level of education earned to youth respondents would look like this (it uses inner_join so only youth respondents with valid adresp15_dv and matches in indresp are left):
library(tidyverse)
library(haven)
# Define paths
path2 <- "C://Main/stata/Nov25/UKDA-6614-stata/stata/stata14_se/ukhls"
# Load youth data
o_youth <- read_dta(file.path(path2, "o_youth.dta"))
# Count observations
cat("Number of observations:", nrow(o_youth), "\n")
# Rename variables for the merge to work
o_youth <- o_youth %>%
rename(
o_pno_org = o_pno,
o_pno = o_adresp15_dv
)
# Load indresp - selecting only hiqual_dv columns plus merge keys
o_indresp <- read_dta(
file.path(path2, "o_indresp.dta"),
col_select = c(o_pno, o_hidp, ends_with("hiqual_dv")))
# Merge (inner_join replicates keep if _merge==3)
# Since you want m:1 and keep only matched, inner_join is appropriate
o_youth_merged <- o_youth %>%
inner_join(o_indresp, by = c("o_pno", "o_hidp"))
# Verify count after merge
cat("Number of observations after merge:", nrow(o_youth_merged), "\n")
I again recommend checking worksheets 7 and 8, and the fragments of the Getting started workshop related to merging partner info as a similar logic applies to any other merges.
The adresp15_dv in the waves you are interested is created as follows:
Step 1: Create adresp15_dv
gen ${wave}adresp15_dv = -9
• Creates the variable and sets everyone to -9 (initially “missing”).
Step 2: Identify children (and child-like cases when age is missing)
gen age015 = (inrange(${wave}age_dv, 0, 16))
gen iout015 = (inlist(${wave}ivfio, 21, 22, 23, 24, 25, 63))
• A flag age015 = 1 if the person is aged 0–16 (treated as a child in this logic).
• A flag iout015 = 1 if the interview outcome (ivfio) is one of 21–25, 63.
• Together, these allow the code to treat someone as a “child case” either because:
o they are aged 0–16, or
o age is missing/negative but the interview outcome suggests a youth/child outcome.
Step 3: Mark adults as “inapplicable”
replace ${wave}adresp15_dv = -8 if (age015 ~= 1) & (iout015 ~= 1)
• If someone is not a child by age and not flagged by the child-related ivfio outcomes, set adresp15_dv to -8 (“inapplicable”).
• Rationale: adults don’t need a “responsible adult” assigned.
Step 4: Assign the responsible adult for children using a hierarchy of pointers
• For those treated as child cases (age015==1 or age_dv<0 & iout015==1), the programme assigns adresp15_dv to a positive person number (PNO) by checking caregiver pointers in a fixed priority order.
• It starts with natural mother, then natural father, then step-parents, then foster parents, then grandparents, only moving down the list if no valid positive PNO has been assigned yet.
Priority order used: Natural mother → 2) Natural father → 3) Step-mother → 4) Step-father → 5) Foster mother → 6) Foster father → 7) Grandmother → 8) Grandfather
In waves <= there was also a fallback based on adresp15 (https://www.understandingsociety.ac.uk/documentation/mainstage/variables/adresp15/). I'm attaching the full code creating adresp15_dv.
I hope this helps.
Best wishes,
Piotr Marzec
UKHLS User Support
Updated by Akansha Naraindas 22 days ago
Thank you so much for your help with this Piotr! this was incredible useful.
I have now merged youth from wave 13 with their responsible adults. However, 17 youths did not have a responsible adult based on that merge.
So then i decided to try to see if any of the 17 youths would link to any of the adult PIDPs that you had mentioned (m_fnpid — Natural father: PIDP
m_mnpid — Natural mother: PIDP
m_pn1pid — Natural parent 1: PIDP
m_pn2pid — Natural parent 2: PIDP
m_pns1pid — Nat/step/adopt parent 1: PIDP
m_pns2pid — Nat/step/adopt parent 2: PIDP)
and it seems that 8 managed to link whereas 9 did not. In the cases of the 8 that linked, they were all linked to the mothers pidp. In this case am i right to assume that the 'adresp' variable may have failed the 8 mothers are technically the responsible adults of the 8 youth that for some reason had an 'NA' in the adresp variable?
For those 9 that did not have any adult link. Is it likely the adults did not participate in the survey in that wave?
Thanks for all your help!