Creating a variable for a phenotype in each twin

I was reviewing the Day 1 script and noticed the variables, WT_T1, and WT_T2 describing the weight for twin 1 and twin 2. I am currently working with a dataset that does not include pre-calculated T1 and T2 variables for the phenotype I am interested in. I am unable to figure out the code for how to create these variables. The goal is to run an ACE model once those variables are created. Thank you!


Hi @pascaleac ! Take a look here for some code

and the video to go with it (refer to the video “Working with Twin Data in R”)

Let me know if you have additional questions or concerns.