Project

General

Profile

Actions

Support #1423

open

Merging youth to adult data

Added by George Comp about 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
Data linkage and consents
Start date:
10/12/2020
% Done:

100%


Description

Hello,

I am using R to do my work.

I am looking at the impact of social media usage on the outcome variable satisfaction (yphfr) on adolescents as they transition from being a teenager to young adults and will use waves 1-8 because I am doing longitudinal analysis. I also would like to use the sclfsato variable as an outcome which I will treat as indetical to yphfr and essentially use it as the same outcome once they join the adult survey.

I want to look use both the mother and father's mental health mental health (GHQ) , and the mother and father's education (maedqf and faedqf) of the youth as a fixed variable.

I would also like to variables from the household level such as material deprivation (matdepa- matdeph) to assess this dimension.

So I will be using variables from the youth questionnaire such as age, whether they were bullied and so on. Link these with the mother and father's education and mental health,and the household so they are linked to the youth data.

The other complication is that I want to look at variables such as social media usage which is asked as both the youth and adult survey from the same individual.

How do I link the youth variables to the mother and father's data, and the household level, and then create eight waves of data to account for the older individuals in the youth survey who move to the adult survey when they are 16?

Many thanks

Actions #1

Updated by Alita Nandi about 4 years ago

  • Status changed from New to Feedback
  • Assignee changed from Stephanie Auty to George Comp
  • % Done changed from 0 to 80
  • Private changed from Yes to No

Hello,

To link individual level data to household level data use the household ID, w_hidp
To link children/youth data with that of their parents, use the father and mother IDs: w_fnspid w_mnspid
w is the placeholder for wave prefix
These variables are in the files w_youth, w_indall

You can merge files across waves using the individual ID: pidp

If you are unsure of how to merge and append datafiles in R, you can join our online training material: https://www.understandingsociety.ac.uk/help/training/online/introduction-course

Hope this helps. If you need further clarifications please let us know.

Best wishes,
Understanding Society User Support

Actions #2

Updated by George Comp about 4 years ago

Thanks for the reply.

More specifically, how would I take youth data from say wave 1 and track those individuals that move from the youth to adult survey using R? i.e how could I create a data frame which specifically has a mixture of youth from wave 1, and then when merging to the wave 2 dataframe, which will contain a mixture of:

1)  those who were in the youth survey at wave 1 but then moved up to the adult survey when they become eligible and

2) the normal wave 2 youth data

And then follow this same process for wave 3 etc where each wave will have youth and those that turn 16 in indresp. How would I create a variable or dataframe with just these people rather than a whole data frame thhat is fuull joined but then filters out those who I do not need

Actions #3

Updated by Alita Nandi about 4 years ago

Hi George,

It will involve merging data files, so should require standard R syntax to do that. But the complication is which files to merge, which cases etc and requires you to have an understanding about the data file structure. It will be easier if we discussed this. If you would like, we could set up an online meeting - via Skype or Zoom. If yes, then please email us at with your availability today and tomorrow.

Best wishes,

Actions #4

Updated by Understanding Society User Support Team about 3 years ago

  • Status changed from Feedback to Resolved
  • Assignee deleted (George Comp)
  • % Done changed from 80 to 100
Actions

Also available in: Atom PDF