TEDS Data Dictionary

Derived Variables in the 7 Year Dataset

This page gives a listing of derived variables in the 7 Year dataset, in alphabetical order of variable name. For each variable, a short written description is followed by the SPSS syntax (in a box) that was used to derive the variable.

This page does not include descriptions of background variables that are derived from other sources and that are included in the 4 Year dataset. For information about such variables, see pages describing background variables, exclusions and scrambled IDs.

Most of the variables from the twin telephone interview and the teacher questionnaire were derived prior to double entering the dataset. Hence the variables used in the syntax on this page (having names ending in "1") were later used to make the corresponding co-twin variables (with names ending in "2").

List of variables described on this page

Click on a variable name in the table below to go to the description on this page. Alternatively, scroll down and find variables in alphabetical order.

Definitions of derived variables

Listed alphabetically

gadults

Family household category based on the adult parent figures present, designed to match the coding of the similar variable at 1st Contact. Derived from item variables for respondent and partner relationships to the twins (gresprel, gpartrel), respondent marital status (grespmstatus) and whether a partner is living in the home (gpartner), as reported by the respondent.
These item variables have by this time been cleaned to remove any inconsistent responses and to infer likely values where missing.

* Derive family category.
* Variable gadults, classifying the family according to adult parents present.
* using the same coding as aadults (1st Contact) and iadults (age 9).
* and based on the respondent and partner variables cleaned above.
* Note there is no distinction here between married and cohabiting.
* Also, the number of male/father respondents was small.
* so they are not separated from female/mother respondents in the categories.
* for single parent and parent+other.
* Start with default value 9=other or unknown, if parent data are present.
IF (gpdata = 1) gadults = 9.
EXECUTE.
* Code 1: Both biological parents are present.
* either mother or father married to or cohabiting with other parent.
IF (gresprel = 1 & ANY(grespmstatus,1,3) & gpartrel = 2) gadults = 1.
IF (gresprel = 2 & ANY(grespmstatus,1,3) & gpartrel = 1) gadults = 1.
EXECUTE.
* Code 2: biological mother or father is present, with guardian/other.
IF (ANY(gresprel,1,2) & ANY(grespmstatus,2,4)) gadults = 2.
* this also includes cases where respondent is other and partner is father.
IF (gresprel = 0 & ANY(grespmstatus,1,3) & gpartrel = 2) gadults = 2.
EXECUTE.
* Code 3: single parent (mother, father or guardian), no partner.
IF (grespmstatus > 4 & gpartner = 0) gadults = 3.
EXECUTE.
* Code 4: mother is present, so is partner.
* but marital status and partner relationship are missing.
* (could be either biological parents or mother + guardian).
IF (gresprel = 1 & gpartner = 1 & SYSMIS(grespmstatus) & SYSMIS(gpartrel)) gadults = 4.
EXECUTE.
* this leaves hardly any coded as 9=other/unknown.
gbmi1/2

Twin BMI, derived from heights and weights as reported by parents in the parent booklet.

* BMI.
* Dataset height variables (from parent booklet) are in centimetres.
* We want BMI in units of kilograms per square metre.
* So include a scaling factor of 10000 in the BMI calculation.
* and round result to nearest 0.1.
COMPUTE gbmi1 = RND(((10000 * gwtkg1) / (ghtcm1 * ghtcm1)), 0.1).
COMPUTE gbmi2 = RND(((10000 * gwtkg2) / (ghtcm2 * ghtcm2)), 0.1).
EXECUTE.
gbpamus1/2, gbpangr1/2, gbpclos1/2, gbpfrus1/2, gbphapp1/2, gbpimpa1/2, gbpleav1/2, gdiexpl1/2, gdiigno1/2, gdiprai1/2, gdisend1/2, gdishou1/2, gdismak1/2

Standardised twin-specific versions of items in the parent booklet, originally coded as elder twin values and younger twin differences. See comments in the syntax below for details of how the variables are derived. These twin-specific items will be double-entered, and used to derive scales (described elsewhere on this page) for parental feelings and discipline.

* Make twin-specific variables from difference variables.
* In the parental feelings and discipline measures.

* First standardise all the raw items.
DESCRIPTIVES VARIABLES= gdiexpl gdiexpld gdismak gdismakd
 gdisend gdisendd gdishou gdishoud gdiigno gdiignod gdiprai gdipraid
 gbpimpa gbpimpad gbphapp gbphappd gbpamus gbpamusd gbpfrus gbpfrusd
 gbpleav gbpleavd gbpangr gbpangrd gbpclos gbpclosd
 /SAVE.

* The standardised elder twin item is the twin 1 variable - rename.
RENAME VARIABLES (Zgdiexpl Zgdismak Zgdisend Zgdishou Zgdiigno
 Zgdiprai Zgbpimpa Zgbphapp Zgbpamus Zgbpfrus Zgbpleav Zgbpangr Zgbpclos
 = gdiexpl1 gdismak1 gdisend1 gdishou1 gdiigno1 
 gdiprai1 gbpimpa1 gbphapp1 gbpamus1 gbpfrus1 gbpleav1 gbpangr1 gbpclos1 ).

* for twin 2, add the standardised difference item (higher value=more).
* to the standardised twin 1 item.
COMPUTE gdiexpl2x = gdiexpl1 + Zgdiexpld.
COMPUTE gdismak2x = gdismak1 + Zgdismakd.
COMPUTE gdisend2x = gdisend1 + Zgdisendd.
COMPUTE gdishou2x = gdishou1 + Zgdishoud.
COMPUTE gdiigno2x = gdiigno1 + Zgdiignod.
COMPUTE gdiprai2x = gdiprai1 + Zgdipraid.
COMPUTE gbpimpa2x = gbpimpa1 + Zgbpimpad.
COMPUTE gbphapp2x = gbphapp1 + Zgbphappd.
COMPUTE gbpamus2x = gbpamus1 + Zgbpamusd.
COMPUTE gbpfrus2x = gbpfrus1 + Zgbpfrusd.
COMPUTE gbpleav2x = gbpleav1 + Zgbpleavd.
COMPUTE gbpangr2x = gbpangr1 + Zgbpangrd.
COMPUTE gbpclos2x = gbpclos1 + Zgbpclosd.
EXECUTE.
* standardise these differences to make the twin 2 items.
DESCRIPTIVES VARIABLES= gdiexpl2x (gdiexpl2) gdismak2x (gdismak2) 
 gdisend2x (gdisend2) gdishou2x (gdishou2) gdiigno2x (gdiigno2) gdiprai2x (gdiprai2) 
 gbpimpa2x (gbpimpa2) gbphapp2x (gbphapp2) gbpamus2x (gbpamus2) gbpfrus2x (gbpfrus2) 
 gbpleav2x (gbpleav2) gbpangr2x (gbpangr2) gbpclos2x (gbpclos2) /SAVE.
gcg1/2, gcl1/2, gcn1/2

Standardised cognitive ability scales, from the twin test data.
Gcg1/2 is General cognitive ability, or 'g'.
Gcl1/2 is Language (or verbal) cognitive ability.
Gcn1/2 is Non-verbal cognitive ability.
Each scale is computed as the mean (or sum) of relevant standardised test scores.

* First filter out all the standard twin exclusions.
* (medical, perinatal, unknown sex/zyg, missing 1st Contact).
* This will affect all standardised variables derived below.
USE ALL.
COMPUTE filter_$=(exclude1 = 0).
VARIABLE LABELS filter_$ 'exclude1 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

* Standardise all scores needed to compute composites.
DESCRIPTIVES VARIABLES=gcongrt1 gsimilt1 gvocabt1 gpicomt1 
 /SAVE .

* Cognitive composites.
* Language, non-verbal and g.
* Require all component items to be non-missing.
COMPUTE lang1 = MEAN.2(Zgsimilt1, Zgvocabt1).
COMPUTE nv1 = MEAN.2(Zgcongrt1, Zgpicomt1).
COMPUTE g1 = MEAN.4(Zgsimilt1, Zgvocabt1, Zgcongrt1, Zgpicomt1).
EXECUTE.

* Standardise the new composites.
DESCRIPTIVES
  VARIABLES = lang1 (gcl1) nv1 (gcn1) g1 (gcg1) /SAVE.

* Standardisations finished - remove filter.
FILTER OFF.
USE ALL.
EXECUTE.
gciage1/2, gpbage

Twin ages (in decimal years) when the twin and parent data were collected.
Gciage1/2 is the twin age when the twin telephone interview was carried out.
Gpbage is the twin age when the parent telephone interview was carried out, or when the parent booklet was completed.
Ages are computed from temporary date variables parentdate and childdate, which are in turn derived from raw date variables. Variable aonsdob is the twin date of birth. These date variables are not retained in the dataset.

* Dates originally recorded on paper then entered manually or by scanning.
* are found to be quite unreliable on inspection, due to respondent/interviewer typos.
* and/or due to data entry errors (parentbookletdate, childbookletdate).
* Dates logged in the TEDS database are a lot more consistent and reliable.
* so use these first, when available, for deriving ages.
* All dates are subject to missing values due to admin changes between cohorts.
* and also due to some unreliable processes during cohort 1.
* so start by getting a best estimate of the date, filling in missing values.

* Parent booklet.
* Booklet return dates are present for cohorts 2/3/4 and seem most reliable.
COMPUTE parentdate = gpbrdate.
* For cohort 1, replace missing values by the NOP record of parent interview date.
IF (SYSMIS(gpbrdate)) parentdate = parentintdate.
EXECUTE.
* If this too is missing, use the TEDS record of interview completion.
IF (SYSMIS(parentdate)) parentdate = intcompletedate.
EXECUTE.
* If still missing, try the logged consent date and the date recorded in the booklet.
IF (SYSMIS(parentdate)) parentdate = parentbookletdate.
IF (SYSMIS(parentdate)) parentdate = consentdate.
EXECUTE.
* Recode back to missing if no parent data are present.
DO IF (gpdata = 0).
 RECODE parentdate (ELSE=SYSMIS).
END IF.
EXECUTE.

* Child interview.
* For cohort 1, start with NOP record of twin interview date.
COMPUTE childdate = twinintdate.
* otherwise, if missing, use the TEDS record of interview completion.
IF (SYSMIS(twinintdate)) childdate = intcompletedate.
EXECUTE.
* If still missing, try the logged consent date and the date recorded in the score sheet.
IF (SYSMIS(childdate)) childdate = childbookletdate.
IF (SYSMIS(childdate)) childdate = consentdate.
EXECUTE.
* Recode back to missing if no twin data are present.
DO IF (gcdata1 = 0).
 RECODE childdate (ELSE=SYSMIS).
END IF.
EXECUTE.

* Now derive twin ages from these dates.
COMPUTE gpbage = RND(((DATEDIFF(parentdate, aonsdob, "days")) / 365.25), 0.1) .
COMPUTE gciage1 = RND(((DATEDIFF(childdate, aonsdob, "days")) / 365.25), 0.1) .
EXECUTE.
gciLLCage1/2, gciLLCdate1/2, gpbLLCage, gpbLLCdate, gtqLLCage1/2, gtqLLCdate1/2

Age and date variables derived for use in datasets in the LLC TRE (but not to be used in other datasets).
Ages and dates are derived for the parent booklet ('gpb'), child telephone interviews/tests ('gci') and teacher questionnaire ('gtq').
The LLC date variables contain only the month and year, not the day, as a means of reducing identifiability. The date variables are strings formatted as 'yyyy-mm'. These LLC dates are designed to enable the TEDS measures to be placed in a time sequence with NHS medical diagnosis dates in the data in the TRE.
The LLC age variables are integers measuring the number of months between birth and the given TEDS activity, consistent with the matching LLC date variables.
Variable aonsdob is the twin birth date - the raw date variables are not retained in the dataset.

* First extract year and month as temp variables, from birth date and activity dates.
COMPUTE birthyear = XDATE.YEAR(aonsdob).
COMPUTE birthmonth = XDATE.MONTH(aonsdob).
COMPUTE gpbyear = XDATE.YEAR(parentdate).
COMPUTE gpbmonth = XDATE.MONTH(parentdate).
COMPUTE gciyear1 = XDATE.YEAR(childdate).
COMPUTE gcimonth1 = XDATE.MONTH(childdate).
COMPUTE gtqyear1 = XDATE.YEAR(teacherdate).
COMPUTE gtqmonth1 = XDATE.MONTH(teacherdate).
EXECUTE.

* The agreed LLC date format is a string yyyy-mm (nominal by default for strings).
* adding '0' where necessary for two-digit months.
STRING gpbLLCdate gciLLCdate1 gtqLLCdate1 (A7).
IF (gpbmonth < 10) gpbLLCdate = CONCAT(STRING(gpbyear, F4), '-0', STRING(gpbmonth, F1)).
IF (gpbmonth >= 10) gpbLLCdate = CONCAT(STRING(gpbyear, F4), '-', STRING(gpbmonth, F2)).
IF (gcimonth1 < 10) gciLLCdate1 = CONCAT(STRING(gciyear1, F4), '-0', STRING(gcimonth1, F1)).
IF (gcimonth1 >= 10) gciLLCdate1 = CONCAT(STRING(gciyear1, F4), '-', STRING(gcimonth1, F2)).
IF (gtqmonth1 < 10) gtqLLCdate1 = CONCAT(STRING(gtqyear1, F4), '-0', STRING(gtqmonth1, F1)).
IF (gtqmonth1 >= 10) gtqLLCdate1 = CONCAT(STRING(gtqyear1, F4), '-', STRING(gtqmonth1, F2)).
EXECUTE.

* The agreed LLC age variable is in integer months.
* and it must agree with the birth and booklet year/month variables that will be available in the LLC.
COMPUTE gpbLLCage = (gpbmonth + (gpbyear * 12)) - (birthmonth + (birthyear * 12)).
COMPUTE gciLLCage1 = (gcimonth1 + (gciyear1 * 12)) - (birthmonth + (birthyear * 12)).
COMPUTE gtqLLCage1 = (gtqmonth1 + (gtqyear1 * 12)) - (birthmonth + (birthyear * 12)).
EXECUTE.
gcl1/2

See gcg1/2, etc above.

gcn1/2

See gcg1/2, etc above.

gcongrt1/2

Total score for the Conceptual Grouping twin test.
Computed as the total of the item scores. Items 4, 5 and 9 have scores 0-2 while other items have scores 0 or 1, so the total score ranges from 0 to 12.

* Conceptual Grouping total score.
* Items 4, 5 and 9 have scores 0-2, the rest are 0-1.
* Compute total score by summing (maximum possible is 12).
COMPUTE gcongrt1 = SUM(gcg11, gcg21, gcg31, 
    gcg41, gcg51, gcg61, gcg71, gcg81, gcg91) .
EXECUTE.
gdiexpl1/2, gdiigno1/2, gdiprai1/2, gdisend1/2, gdishou1/2, gdismak1/2

See gbpamus1/2, etc above.

gpdisneg1/2, gpdispos1/2, gpparneg1/2, gpparpos1/2, gppar1/2

Standardised parenting scales, computed from parent booklet data.
Parental discipline scales: negative/harsh discipline (gpdisneg, 4 items) and positive discipline (gpdispos, 2 items). Parental feelings scales: negative feelings (gpparneg, 4 items), positive feelings (gpparpos, 3 items) and overall total (gppar, all 7 items).. These composites are derived from twin-specific items that have in turn been derived from the raw elder twin ratings and younger twin difference scores; these derived items are described elsewhere on this page.

* Parental feelings and discipline.
* Use the twin-specific versions, already derived.
* and double entered in the first script.
* Composites are means, requiring at least half the items to be non-missing.
* Harsh/negative discipline scale from 4 items.
COMPUTE pdisneg1 = MEAN.3(gdismak1, gdisend1, gdishou1, gdiigno1).
COMPUTE pdisneg2 = MEAN.3(gdismak2, gdisend2, gdishou2, gdiigno2).
EXECUTE.
* Positive discipline scale from 2 items.
COMPUTE pdispos1 = MEAN.2(gdiexpl1, gdiprai1).
COMPUTE pdispos2 = MEAN.2(gdiexpl2, gdiprai2).
EXECUTE.

* Negative parental feelings scale from 4 items.
COMPUTE pparneg1 = MEAN.2(gbpimpa1, gbpfrus1, gbpleav1, gbpangr1).
COMPUTE pparneg2 = MEAN.2(gbpimpa2, gbpfrus2, gbpleav2, gbpangr2).
EXECUTE.
* Positive parental feelings scale from 3 items.
COMPUTE pparpos1 = MEAN.2(gbphapp1, gbpamus1, gbpclos1).
COMPUTE pparpos2 = MEAN.2(gbphapp2, gbpamus2, gbpclos2).
EXECUTE.
* standardise the new scales.
DESCRIPTIVES VARIABLES= pdisneg1 (gpdisneg1) pdisneg2 (gpdisneg2) 
 pdispos1 (gpdispos1) pdispos2 (gpdispos2)
 pparneg1 (gpparneg1) pparneg2 (gpparneg2) 
 pparpos1 (gpparpos1) pparpos2 (gpparpos2) /SAVE.

* Total parental feelings composite: negative minus positive.
COMPUTE ppar1 = gpparneg1 - gpparpos1.
COMPUTE ppar2 = gpparneg2 - gpparpos2.
EXECUTE.
* standardise.
DESCRIPTIVES VARIABLES= ppar1 (gppar1) ppar2 (gppar2) /SAVE.
gfahqual, gfajob, gfasoc, gmohqual, gmojob, gmosoc

Father and Mother SES-related categories, from the parent data.
Gfahqual and gmohqual are the highest levels of educational qualifications for the father and mother respectively.
Gfasoc and gmosoc are the occupational SOC codes for the father and mother respectively.
Gfajob and gmojob are employment status codes for the father and mother respectively.
In the first part of the syntax below, the respondent and the respondent's partner, from the parent booklet, are each identified as the mother or father where possible.
This information is then used to derive mother and father variables from respondent and partner variables in the raw data.

* Determine sex of respondent and partner.
* gresprel gives respondent's relationship to the twins.
* 1=mum, 2=dad.
* (other codes 3-8 not used and 0=other is rare but unclear).
* Recode temporarily to 1=female parent, 2=male parent, 0=unknown.
COMPUTE resp = 0.
IF (ANY(gresprel,1,3,5)) resp = 1.
IF (gresprel = 2) resp = 2.
EXECUTE.
* In some cases where gpbrel is missing, we know that the partner.
* is the father (gpartrel=2) so can assume respondent is female parent.
IF (resp = 0 & gpartrel = 2) resp = 1.
EXECUTE.

* Now determine whether respondent's partner is father or mother.
* (Codes used for gpartrel are 1=mother, 2=father, 4=stepfather, 0=other).
* First check gpartrel, but avoid cases where respondent and partner apparently have same sex.
* gpartrel=0 (other) can be assumed to be a male parent, if respondent is female.
COMPUTE part = 0.
IF (resp = 1 & ANY(gpartrel,2,4)) part = 2.
IF (resp = 2 & gpartrel = 1) part = 1.
EXECUTE.
* If gpartrel is missing or 0=other, and gpartner indicates that a partner exists.
* then deduce partner sex from respondent sex.
* (assuming that there are few if any same-sex partnerships here.
* because non-missing values of gresprel and gpartrel show none).
IF (gpartner = 1 & resp = 1 & (SYSMIS(gpartrel) | gpartrel = 0)) part = 2.
IF (gpartner = 1 & resp = 2 & (SYSMIS(gpartrel) | gpartrel = 0)) part = 1.
EXECUTE.

* Now use resp and part variables to compute new father and mother SES variables.
NUMERIC gmosoc gfasoc gmohqual gfahqual gmojob gfajob (F1.0).
VARIABLE LEVEL gmosoc gfasoc gmohqual gfahqual (ORDINAL).
VARIABLE LEVEL gmojob gfajob (NOMINAL).
* SOC codes.
* ---------.
IF (resp = 1) gmosoc = grespsoc.
IF (resp = 2) gfasoc = grespsoc.
EXECUTE.
IF (part = 1) gmosoc = gpartsoc.
IF (part = 2) gfasoc = gpartsoc.
EXECUTE.
* Highest qualification level.
* ---------------------------.
* Respondent and partner variables gresphqual and gparthqual.
* already have the required coding 1-7: assign to female and male.
* parent variables as appropriate.
IF (resp = 1) gmohqual = grresphqual.
IF (resp = 2) gfahqual = grresphqual.
EXECUTE.
IF (part = 1) gmohqual = gparthqual.
IF (part = 2) gfahqual = gparthqual.
EXECUTE.
* In employment.
* -------------.
* Use items grespwork/gpartwork (ignoring some inconsistencies.
* between these and subsequent items in the data).
* Code new variables gmojob/gfajob as 1=employed, 0=not employed.
* 2=full time parent (same coding as amojob/afajob).
DO IF (resp = 1).
  RECODE grespwork (1=2) (2=1) (3=1) (4=0) (5=0) (SYSMIS=SYSMIS) into gmojob.
ELSE IF (resp = 2).
  RECODE grespwork (1=2) (2=1) (3=1) (4=0) (5=0) (SYSMIS=SYSMIS) into gfajob.
END IF.
EXECUTE.
DO IF (part = 1).
  RECODE gpartwork (1=2) (2=1) (3=1) (4=0) (5=0) (SYSMIS=SYSMIS) into gmojob.
ELSE IF (part = 2).
  RECODE gpartwork (1=2) (2=1) (3=1) (4=0) (5=0) (SYSMIS=SYSMIS) into gfajob.
END IF.
EXECUTE.
glecount

Number of reported events in the age 7 parent life events measure. This is not a conventional scale, but simply a convenient count derived by summing the items (each coded 1=yes 0=no).

* Life events.
* Derive a count of reported life events.
* Most would normally have an adverse effect in most cases (deaths, separations, etc).
* while some could have positive or negative effects (new sibling, moved house, etc).
* but include them all anyway because there is no discriminating information.
* only derive count if the life events data are present - use parent data flag.
DO IF (gpdata = 1).
  * each item has value 1 if reported.
  COUNT glecount = glehospp glefinch gledeadp gledeadg glebirth gledivor 
   gledeads glehospt glenewp glesepfp gleillfam gledearel glerelmov 
   gledeapet glemoved gletrauma glenewper (1).
END IF.
EXECUTE.
* Negligible numbers above 6 so combine these.
RECODE glecount (6 THRU HIGHEST=6).
EXECUTE.
gnwrt1/2

Total score for the Non Word Recognition twin test.
Computed as the sum of the 12 item scores. Each item has score 0 or 1, hence the total score has range 0 to 12.

* Non Word Recognition score.
* NOTE: data only collected for cohort 1.
* Each item scored as 1=right 0=wrong - compute total out of 12.
COMPUTE gnwrt1 = SUM(gnwr011, gnwr021, gnwr031, gnwr041, gnwr051, gnwr061, 
  gnwr071, gnwr081, gnwr091, gnwr101, gnwr111, gnwr121).
EXECUTE.
gpafel1/2

See gdisp1/2, etc above.

gpbage

See gciage1/2, etc above.

gpanxfeart1/2, gpanxnafft1/2, gpanxncogt1/2, gpanxshyt1/2, gpanxocbt1/2, gpanxt1/2

ARBQ anxiety scales.
From the 21 parent-rated items of the ARBQ measure at age 7, plus the 5 items of SDQ emotion, at age 7.
gpanxshyt1/2: shyness (social anxiety) scale, 4 items.
gpanxocbt1/2: ocb (obsessive-compulsive behaviour) scale, 4 items.
gpanxfeart1/2: fear scale, 5 items.
gpanxnafft1/2: negative affect scale, 5 items.
gpanxncogt1/2: negative cognition scale, 6 items.
gpanxt1/2: overall anxiety total scale, 26 items.
These are comparable with the corresponding teacher-rated scales at this age - the 17 teacher items are a subset of the 21 parent ARBQ items. These ARBQ scales are also comparable with those used at other ages (3, 4, 9, 16), subject to some variations in the items that were included at each age. All items are coded 0/1/2 so each subscale has values ranging from 0 up to double the number of items. At least half the items are required to be non-missing for each subscale. Additional details are given in the syntax below.
Published papers are broadly in agreement about the items used to make the subscales. At all ages where the items are present, the following decisions have been made about the use of the items:
(a) anx09, "twitches", and sdqemo1, "headaches", are not used in any of the subscales, in agreement with at least two papers. anx09 was used in OCB by one paper and in negative affect by another paper while sdqemo1 was used in fear by one paper.
(b) anx05, "asks for reassurance", is used in the negative cognition subscale, as in at least two papers. It was used in OCB by another paper.
(c) anx06, "doing things over and over", is used in the OCB subscale, in agreement with at least two papers. It was used in negative affect in another paper.

* ARBQ shyness (social anxiety) subscale.
* Parent: 4 items (0-8).
* including an SDQ emotion item.
COMPUTE gpanxshyt1 = 4 * MEAN.2(gpanx021, gpanx031, gpanx071, gpsdqemo41).
COMPUTE gpanxshyt2 = 4 * MEAN.2(gpanx022, gpanx032, gpanx072, gpsdqemo42).
EXECUTE.

* ARBQ OCB subscale.
* 4 items, 0-8.
COMPUTE gpanxocbt1 = 4 * MEAN.2(gpanx041, gpanx061, gpanx141, gpanx211).
COMPUTE gpanxocbt2 = 4 * MEAN.2(gpanx042, gpanx062, gpanx142, gpanx212).
EXECUTE.

* ARBQ fear subscale.
* Parent: 5 items (0-10).
* including an SDQ emotion item.
COMPUTE gpanxfeart1 = 5 * MEAN.3(gpanx011, gpanx081, gpanx181, gpanx201, gpsdqemo51).
COMPUTE gpanxfeart2 = 5 * MEAN.3(gpanx012, gpanx082, gpanx182, gpanx202, gpsdqemo52).
EXECUTE.

* ARBQ negative affect subscale.
* 5 items, 0-10.
* including an SDQ emotion item.
COMPUTE gpanxnafft1 = 5 * MEAN.3(gpanx101, gpanx121, gpanx161, gpanx171, gpsdqemo31).
COMPUTE gpanxnafft2 = 5 * MEAN.3(gpanx102, gpanx122, gpanx162, gpanx172, gpsdqemo32).
EXECUTE.

* ARBQ negative cognition subscale.
* 6 items, 0-12.
* including an SDQ emotion item.
COMPUTE gpanxncogt1 = 6 * MEAN.3(gpanx051, gpanx111, gpanx131, gpanx151, gpanx191, gpsdqemo21).
COMPUTE gpanxncogt2 = 6 * MEAN.3(gpanx052, gpanx112, gpanx132, gpanx152, gpanx192, gpsdqemo22).
EXECUTE.

* ARBQ total anxiety scale.
* Include all 21 parent items plus the 5 SDQ emotion items.
* hence including all items from the 5 subscales above.
* plus two items not in any subscale: sdqemo1 (headaches, etc).
* and anx09 (twitches, etc).
* Both items correlate with all the others (anx09 only slightly).
* but do not clearly belong to any one of the subscales.
COMPUTE gpanxt1 = 26 * MEAN.13(gpanx011, gpanx021, gpanx031, gpanx041, gpanx051, 
  gpanx061, gpanx071, gpanx081, gpanx091, gpanx101, gpanx111, gpanx121, gpanx131, 
  gpanx141, gpanx151, gpanx161, gpanx171, gpanx181, gpanx191, gpanx201, gpanx211,
  gpsdqemo11, gpsdqemo21, gpsdqemo31, gpsdqemo41, gpsdqemo51).
COMPUTE gpanxt2 = 26 * MEAN.13(gpanx012, gpanx022, gpanx032, gpanx042, gpanx052, 
  gpanx062, gpanx072, gpanx082, gpanx092, gpanx102, gpanx112, gpanx122, gpanx132, 
  gpanx142, gpanx152, gpanx162, gpanx172, gpanx182, gpanx192, gpanx202, gpanx212,
  gpsdqemo12, gpsdqemo22, gpsdqemo32, gpsdqemo42, gpsdqemo52).
EXECUTE.
gpasdnont1/2, gtasdnont1/2

ASD Non-Social behaviour scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from 6 items: 3 specifically ASD items plus 3 anxiety measure items. At least 3 of the 6 items are required to be non-missing. All items have values 0/1/2 so the scale values range from 0 to 12.

* Non-Social (ASD) scale.
* From 3 ASD items and 3 anxiety items, 6 items in total.
* Total scores out of 12 - require at least 3 items.
COMPUTE gpasdnont1 = 6 * MEAN.3(gpasd11, gpasd51, gpasd71, 
    gpanx041, gpanx061, gpanx141).
COMPUTE gpasdnont2 = 6 * MEAN.3(gpasd12, gpasd52, gpasd72, 
    gpanx042, gpanx062, gpanx142). 
COMPUTE gtasdnont1 = 6 * MEAN.3(gtasd11, gtasd51, gtasd71, 
    gtanx041, gtanx061, gtanx141). 
EXECUTE.
gpasdsoct1/2, gtasdsoct1/2

ASD Social behaviour scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from 10 items: 4 specifically ASD items plus 1 anxiety item and 5 SDQ items. At least 5 of the 10 items are required to be non-missing. All items have values 0/1/2 so the scale values range from 0 to 20.

* Social (ASD) scale.
* From 4 ASD items, 1 anxiety item, 1 SDQ prosocial and 4 SDQ peer items.
* Total 10 items, giving score out of 20; required at least 5 items.
COMPUTE gpasdsoct1 = 10 * MEAN.5(gpasd21, gpasd31, gpasd41, gpasd8r1, gpanx031, 
  gpsdqpro1r1, gpsdqper11, gpsdqper2r1, gpsdqper3r1, gpsdqper51). 
COMPUTE gpasdsoct2 = 10 * MEAN.5(gpasd22, gpasd32, gpasd42, gpasd8r2, gpanx032, 
  gpsdqpro1r2, gpsdqper12, gpsdqper2r2, gpsdqper3r2, gpsdqper52).
COMPUTE gtasdsoct1 = 10 * MEAN.5(gtasd21, gtasd31, gtasd41, gtasd8r1, gtanx031, 
  gtsdqpro1r1, gtsdqper11, gtsdqper2r1, gtsdqper3r1, gtsdqper51).
EXECUTE.
gpbLLCage, gpbLLCdate

See gciLLCage1/2, etc above.

gpicomt1/2

Total score for the Picture Completion twin test, computed as the sum of the 21 item scores. Each item has score 0 or 1, so the total score has values in the range 0 to 21.

* Picture Completion total score.
* All items have scores 0/1.
* Compute total score by summing (maximum possible is 21).
COMPUTE gpicomt1 = SUM(gpc011, gpc021, gpc031, gpc041, gpc051, gpc061, 
 gpc071, gpc081, gpc091, gpc101, gpc111, gpc121, gpc131, gpc141, 
 gpc151, gpc161, gpc171, gpc181, gpc191, gpc201, gpc211).
EXECUTE .
gpparneg1/2, gpparpos1/2, gppar1/2

See gpdisneg1/2, etc below.

gppsdcalt1/2, gtpsdcalt1/2

APSD (or PSD) Callous-Unemotional behaviour scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from 7 items: 3 from the PSD measure, supplemented with 4 SDQ items. At least 4 of the 7 items are required to be non-missing. All items have values 0/1/2 so the scale values range from 0 to 14.

* Callous-Unemotional (PSD) scale.
* From 3 PSD items, 3 SDQ prosocial and 1 SDQ peer item: 7 items total.
* Total scores out of 14 - require at least 4 items to be present.
COMPUTE gppsdcalt1 = 7 * MEAN.4(gpaps03r1, gpaps12r1, gpaps191, 
  gpsdqpro1r1, gpsdqpro3r1, gpsdqpro4r1, gpsdqper2r1).
COMPUTE gppsdcalt2 = 7 * MEAN.4(gpaps03r2, gpaps12r2, gpaps192, 
  gpsdqpro1r2, gpsdqpro3r2, gpsdqpro4r2, gpsdqper2r2).
COMPUTE gtpsdcalt1 = 7 * MEAN.4(gtaps03r1, gtaps12r1, gtaps191, 
  gtsdqpro1r1, gtsdqpro3r1, gtsdqpro4r1, gtsdqper2r1).
EXECUTE.
gppsdnart1/2, gtpsdnart1/2

APSD (or PSD) Narcissism behaviour scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from 5 items of the PSD measure. At least 3 of the 5 items are required to be non-missing. All items have values 0/1/2 so the scale values range from 0 to 10.

* Narcissism (PSD) scale.
* From 5 PSD items, giving total scores out of 10.
* Require at least 3 items to be non-missing.
COMPUTE gppsdnart1 = 5 * MEAN.3(gpaps051, gpaps081, gpaps111, gpaps141, gpaps161).
COMPUTE gppsdnart2 = 5 * MEAN.3(gpaps052, gpaps082, gpaps112, gpaps142, gpaps162).
COMPUTE gtpsdnart1 = 5 * MEAN.3(gtaps051, gtaps081, gtaps111, gtaps141, gtaps161).
EXECUTE.
gpsdqbeht1/2, gtsdqbeht1/2

SDQ Total Problem Behaviour scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from 20 items: 5 items each from the Conduct, Emotion, Hyperactivity and Peer Problem subscales of the SDQ measure. At least 10 of the 20 items are required to be non-missing.

* SDQ Total Problem Behaviours.
* Includes Hyperactivity, Conduct, Peer Problem and Emotional symptoms but not Prosocial items.
* Total scores out of 40 - need at least 10 items.
COMPUTE gpsdqbeht1 = 20 * MEAN.10(gpsdqhyp11, gpsdqhyp21, gpsdqhyp31, gpsdqhyp4r1, gpsdqhyp5r1,
  gpsdqcon11, gpsdqcon2r1, gpsdqcon31, gpsdqcon41, gpsdqcon51,
  gpsdqper11, gpsdqper2r1, gpsdqper3r1, gpsdqper41, gpsdqper51,
  gpsdqemo11, gpsdqemo21, gpsdqemo31, gpsdqemo41, gpsdqemo51).
COMPUTE gpsdqbeht2 = 20 * MEAN.10(gpsdqhyp12, gpsdqhyp22, gpsdqhyp32, gpsdqhyp4r2, gpsdqhyp5r2,
  gpsdqcon12, gpsdqcon2r2, gpsdqcon32, gpsdqcon42, gpsdqcon52,
  gpsdqper12, gpsdqper2r2, gpsdqper3r2, gpsdqper42, gpsdqper52,
  gpsdqemo12, gpsdqemo22, gpsdqemo32, gpsdqemo42, gpsdqemo52).
COMPUTE gtsdqbeht1 = 20 * MEAN.10(gtsdqhyp11, gtsdqhyp21, gtsdqhyp31, gtsdqhyp4r1, gtsdqhyp5r1,
  gtsdqcon11, gtsdqcon2r1, gtsdqcon31, gtsdqcon41, gtsdqcon51,
  gtsdqper11, gtsdqper2r1, gtsdqper3r1, gtsdqper41, gtsdqper51,
  gtsdqemo11, gtsdqemo21, gtsdqemo31, gtsdqemo41, gtsdqemo51).
EXECUTE.
gpsdqcont1/2, gtsdqcont1/2

SDQ Conduct scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from the 5 Conduct items of the SDQ measure. At least 3 of the 5 items are required to be non-missing.

* SDQ Conduct scale.
* Total scores out of 10 - need at least 3 items.
COMPUTE gpsdqcont1 = 5 * MEAN.3(gpsdqcon11, gpsdqcon2r1, gpsdqcon31, gpsdqcon41, gpsdqcon51).
COMPUTE gpsdqcont2 = 5 * MEAN.3(gpsdqcon12, gpsdqcon2r2, gpsdqcon32, gpsdqcon42, gpsdqcon52).
COMPUTE gtsdqcont1 = 5 * MEAN.3(gtsdqcon11, gtsdqcon2r1, gtsdqcon31, gtsdqcon41, gtsdqcon51).
EXECUTE.
gpsdqemot1/2, gtsdqemot1/2

SDQ Emotional symptoms scales (previously called Anxiety), from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from the 5 Emotional problems items of the SDQ measure. In the parent booklet, one of the items (gpsdqemo11/2) was presented amongst the Health items rather than with the other behaviour items.

* SDQ Emotional symptoms scale.
* Includes items from Health section about headaches/stomach-aches/sickness .
* Total scores out of 10 - need at least 3 items.
COMPUTE gpsdqemot1 = 5 * MEAN.3(gpsdqemo11, gpsdqemo21, gpsdqemo31, gpsdqemo41, gpsdqemo51).
COMPUTE gpsdqemot2 = 5 * MEAN.3(gpsdqemo12, gpsdqemo22, gpsdqemo32, gpsdqemo42, gpsdqemo52).
COMPUTE gtsdqemot1 = 5 * MEAN.3(gtsdqemo11, gtsdqemo21, gtsdqemo31, gtsdqemo41, gtsdqemo51).
EXECUTE.
gpsdqhypt1/2, gtsdqhypt1/2

SDQ Hyperactivity scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from the 5 Hyperactivity items of the SDQ measure. At least 3 of the 5 items are required to be non-missing.

* SDQ Hyperactivity scale.
* Total scores out of 10 - need at least 3 items.
COMPUTE gpsdqhypt1 = 5 * MEAN.3(gpsdqhyp11, gpsdqhyp21, gpsdqhyp31, gpsdqhyp4r1, gpsdqhyp5r1).
COMPUTE gpsdqhypt2 = 5 * MEAN.3(gpsdqhyp12, gpsdqhyp22, gpsdqhyp32, gpsdqhyp4r2, gpsdqhyp5r2).
COMPUTE gtsdqhypt1 = 5 * MEAN.3(gtsdqhyp11, gtsdqhyp21, gtsdqhyp31, gtsdqhyp4r1, gtsdqhyp5r1).
EXECUTE.
gpsdqpert1/2, gtsdqpert1/2

SDQ Peer Problem scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from the 5 Peer problem items of the SDQ measure. At least 3 of the 5 items are required to be non-missing.

* SDQ Peer Problem scale.
* Total scores out of 10 - need at least 3 items.
COMPUTE gpsdqpert1 = 5 * MEAN.3(gpsdqper11, gpsdqper2r1, gpsdqper3r1, gpsdqper41, gpsdqper51).
COMPUTE gpsdqpert2 = 5 * MEAN.3(gpsdqper12, gpsdqper2r2, gpsdqper3r2, gpsdqper42, gpsdqper52).
COMPUTE gtsdqpert1 = 5 * MEAN.3(gtsdqper11, gtsdqper2r1, gtsdqper3r1, gtsdqper41, gtsdqper51).
EXECUTE.
gpsdqprot1/2, gtsdqprot1/2

SDQ Prosocial scales, from parent data ("gp" scales) and from teacher data ("gt" scales).
Derived from the 5 Prosocial items of the SDQ measure. At least 3 of the 5 items are required to be non-missing.

* SDQ Prosocial scale.
* Total scores out of 10 - need at least 3 items.
COMPUTE gpsdqprot1 = 5 * MEAN.3(gpsdqpro11, gpsdqpro21, gpsdqpro31, gpsdqpro41, gpsdqpro51).
COMPUTE gpsdqprot2 = 5 * MEAN.3(gpsdqpro12, gpsdqpro22, gpsdqpro32, gpsdqpro42, gpsdqpro52).
COMPUTE gtsdqprot1 = 5 * MEAN.3(gtsdqpro11, gtsdqpro21, gtsdqpro31, gtsdqpro41, gtsdqpro51).
EXECUTE.
gses

Composite SES scale, based on parent data.
Gses has higher values for higher SES (higher qualifications and occupational status).
Gses is computed as the mean of z-standardized mother and father scales for occupational SOC codes (reversed) and educational qualifications.
Derived variables gmosoc, gfasoc, gmohqual and gfahqual are described elsewhere on this page.

* Create composite SES variable.
* First filter out all the standard exclusions for the twin pair.
* (medical, perinatal, unknown sex/zyg, missing 1st Contact).
* This will affect all standardised variables derived below.
USE ALL.
COMPUTE filter_$=(exclude1 = 0 & exclude2 = 0).
VARIABLE LABELS filter_$ 'exclude1 = 0 & exclude2 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

* Standardise the component variables.
DESCRIPTIVES
  VARIABLES= gmosoc gfasoc gmohqual gfahqual /SAVE .

* Get reversed versions of parent SOC (lowest value = lowest SES).
COMPUTE Zgmosocr = -1 * Zgmosoc.
COMPUTE Zgfasocr = -1 * Zgfasoc.
EXECUTE.

* Compute SES composite as the mean, requiring a minimum of two components.
COMPUTE ses = MEAN.2(Zgmohqual, Zgfahqual, Zgmosocr, Zgfasocr).
EXECUTE.

* Make the new variable standardised.
DESCRIPTIVES VARIABLES= ses (gses) /SAVE .

* Standardisations finished - remove filter.
FILTER OFF.
USE ALL.
EXECUTE.
gsevenyr

Flag variable to show presence of some 7 Year data: parent data, and/or child data for either or both twins, and/or teacher data for either or both twins.
This syntax is executed after merging the parent, twin and teacher data together, and after double-entering the data.

* Select all cases with at least some 7yr data (parent, teacher or twin).
FILTER OFF.
USE ALL.
SELECT IF(gpdata = 1 | gcdata1 = 1 | gcdata2 = 1 | gtdata1 = 1 | gtdata2 = 1).
EXECUTE .

* Add a general flag for 7-year data (useful if merging with other datasets).
COMPUTE gsevenyr = 1.
EXECUTE.
gsimilt1/2

Total score for the Similarities twin test, computed as the sum of the item scores. Items 1-4 have scores 0/1 while the other items have scores 0/1/2, hence the total score from 13 items ranges from 0 to 22.

* Similarities total score.
* Items 1 to 4 have scores 0-1, the rest are 0-2.
* Compute total score by summing (maximum possible is 22).
COMPUTE gsimilt1 = SUM(gsim011, gsim021, gsim031, gsim041, gsim051, 
 gsim061, gsim071, gsim081, gsim091, gsim101, gsim111, gsim121, gsim131).
EXECUTE.
gt2ac1/2, gteng1/2, gtmat1/2

Standardised academic achievement scales, from the teacher data.
Gte1/2 is academic achievement for English.
Gtm1/2 is academic achievement for Maths.
Gta1/2 is the overall academic achievement.
Each scale is derived as the mean of standardised National Curriculum teacher rating scores.

* Non-standardised achievement means.
* The standardised means have been used historically.
* but simpler mean achievement levels can be used instead.
* and have the benefit of retaining the National Curriculum levels as scores.
* which should be equivalent across ages (7 to 14 in TEDS).
* Derive means for English, maths and overall (no science at age 7).
* Teacher-reported English, maths: mean of component reported levels.
COMPUTE gteng1 = MEAN(gtengsl1, gtengrd1, gtengwr1).
COMPUTE gtmat1 = MEAN(gtmathu1, gtmathn1, gtmaths1).
EXECUTE.
* 2-subject (English and maths) overall achievement.
* requiring both to be non-missing.
COMPUTE gt2ac1 = MEAN.2(gteng1, gtmat1).
EXECUTE.
gtanxfeart1/2, gtanxnafft1/2, gtanxncogt1/2, gtanxshyt1/2, gtanxocbt1/2, gtanxt1/2

ARBQ anxiety scales.
From the 17 teacher-rated items of the ARBQ measure, plus the 5 items of SDQ emotion, at age 7. The SDQ emotion items are treated here as part of the ARBQ measure of anxiety.
gtanxshyt1/2: shyness (social anxiety) scale, 3 items.
gtanxocbt1/2: ocb (obsessive-compulsive behaviour) scale, 4 items.
gtanxfeart1/2: fear scale, 3 items.
gtanxnafft1/2: negative affect scale, 5 items.
gtanxncogt1/2: negative cognition scale, 6 items.
gtanxt1/2: overall anxiety total scale, 22 items.
These are comparable with the corresponding parent-rated scales at this age - the 17 teacher items are a subset of the 21 parent items, which is why the teacher-rated shyness and fear subscales have fewer items.
All items are coded 0/1/2 so each subscale has values ranging from 0 up to double the number of items. At least half the items are required to be non-missing for each subscale.
See also comments in the parent ARBQ scales description on this page (gpanxfeart1/2, etc).

* ARBQ shyness (social anxiety) subscale.
* Teacher: 3 items (0-6).
* including an SDQ emotion item.
COMPUTE gtanxshyt1 = 3 * MEAN.3(gtanx031, gtanx071, gtsdqemo41).
EXECUTE.

* ARBQ OCB subscale.
* 4 items, 0-8.
COMPUTE gtanxocbt1 = 4 * MEAN.2(gtanx041, gtanx061, gtanx141, gtanx211).
EXECUTE.

* ARBQ fear subscale.
* Teacher: 3 items (0-6).
* including an SDQ emotion item.
COMPUTE gtanxfeart1 = 3 * MEAN.2(gtanx011, gtanx181, gtsdqemo51).
EXECUTE.

* ARBQ negative affect subscale.
* 5 items, 0-10.
* including an SDQ emotion item.
COMPUTE gtanxnafft1 = 5 * MEAN.3(gtanx101, gtanx121, gtanx161, gtanx171, gtsdqemo31).
EXECUTE.

* ARBQ negative cognition subscale.
* 6 items, 0-12.
* including an SDQ emotion item.
COMPUTE gtanxncogt1 = 6 * MEAN.3(gtanx051, gtanx111, gtanx131, gtanx151, gtanx191, gtsdqemo21).
EXECUTE.

* ARBQ total anxiety scale.
* Include all 17 teacher items plus all 5 SDQ emotion items.
* hence including all items from the 5 subscales above.
* plus gtsdqemo11 which is not included in a subscale.
COMPUTE gtanxt1 = 22 * MEAN.11(gtanx011, gtanx031, gtanx041, 
  gtanx051, gtanx061, gtanx071, gtanx101, gtanx111, gtanx121, gtanx131, 
  gtanx141, gtanx151, gtanx161, gtanx171, gtanx181, gtanx191, gtanx211,
  gtsdqemo11, gtsdqemo21, gtsdqemo31, gtsdqemo41, gtsdqemo51).EXECUTE.
gtasdnont1/2

See gpasdnont1/2, gtasdnont1/2 above.

gtasdsoct1/2

See gpasdsoct1/2, gtasdsoct1/2 above.

gteng1/2

See gt2ac1/2, etc above.

gtmat1/2

See gt2ac1/2, etc above.

gtpsdcalt1/2

See gppsdcalt1/2, gtpsdcalt1/2 above.

gtpsdnart1/2

See gppsdnart1/2, gtpsdnart1/2 above.

gtowt1/2

This is a standardised overall TOWRE score, combining valid scores for the Word and Non-word subtests.
Computed from the raw TOWRE scores, including the practice scores to check validity. The practice scores are not retained in the dataset.

* First clean up the TOWRE data.
* Derive TOWRE validity flag variable, 1=valid 0=invalid.
* Only compute flag variable for twins with data.
RECODE gcdata1 (1=1) (0=SYSMIS) 
 INTO  gtowval1 .
EXECUTE .
* Invalid if either of the main scores is missing.
IF (gcdata1 = 1 & (SYSMIS(gtowwd1) | SYSMIS(gtownw1))) gtowval1 = 0.
EXECUTE.
* (affects 154 twins).
* and invalid if a practice score is >=5 and the corresponding main score is 0.
IF (((gtowwdp1 >= 5) & (gtowwd1 = 0)) | ((gtownwp1 >= 5) & (gtownw1 = 0))) gtowval1 = 0.
EXECUTE.
* (affects another 54 twins).
* Where invalid, recode the TOWRE scores to missing.
DO IF (gtowval1 = 0).
 RECODE gtowwdp1 gtowwd1 gtownwp1 gtownw1 (ELSE=SYSMIS).
END IF.
EXECUTE.

* TOWRE composite.
* Filter out all the standard twin exclusions before standardising.
* (medical, perinatal, unknown sex/zyg, missing 1st Contact).
* This will affect all standardised variables derived below.
USE ALL.
COMPUTE filter_$=(exclude1 = 0).
VARIABLE LABELS filter_$ 'exclude1 = 0 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

* Standardise the scores needed to compute composite.
DESCRIPTIVES VARIABLES=gtowwd1 gtownw1 /SAVE .

* Compute composite as the mean of the standardised scores.
* (note that invalid scores were removed above).
COMPUTE towt1 = MEAN.2(zgtowwd1,zgtownw1).
EXECUTE.
* now standaridise the composite.
DESCRIPTIVES
  VARIABLES=towt1 (gtowt1) /SAVE .

* Standardisations finished - remove filter.
FILTER OFF.
USE ALL.
EXECUTE.
gtqage1/2

Twin age (in decimal years) when the teacher questionnaire was returned.
The completion date was not recorded on the questionnaire itself, so these calculations rely on the date (gtqdate1/2) when the questionnaire was logged in the TEDS office.
The syntax below also involves the twin birth date (aonsdob) and parent booklet age (gpbage). The various date variables are not retained in the dataset.

* Derive a temporary best estimate of teacher qnr date (teacherdate).
* TEDS record of questionnaire return date is pretty reliable.
COMPUTE teacherdate = gtqdate1.
EXECUTE.
* Missing in 38 cases due to logging errors.
* Try the cotwin's teacher date.
IF (SYSMIS(teacherdate)) teacherdate = gtqdate2.
EXECUTE.
* Now approximate with the parent date.
IF (SYSMIS(teacherdate)) teacherdate = parentdate.
EXECUTE.
* Recode back to missing if no teacher data are present.
DO IF (gtdata1 = 0).
  RECODE teacherdate (ELSE=SYSMIS).
END IF.
EXECUTE.
* Now subtract the birth date to derive the age.
COMPUTE gtqage1 = RND(((DATEDIFF(teacherdate, aonsdob, "days")) / 365.25), 0.1) .
EXECUTE.
gtqLLCage1/2, gtqLLCdate1/2

See gciLLCage1/2, etc above.

gtsdqbeht1/2

See gpsdqbeht1/2, gtsdqbeht1/2 above.

gtsdqcont1/2

See gpsdqcont1/2, gtsdqcont1/2 above.

gtsdqemot1/2

See gpsdqemot1/2, gtsdqemot1/2 above.

gtsdqhypt1/2

See gpsdqhypt1/2, gtsdqhypt1/2 above.

gtsdqpert1/2

See gpsdqpert1/2, gtsdqpert1/2 above.

gtsdqprot1/2

See gpsdqprot1/2, gtsdqprot1/2 above.

gvocabt1/2

Total score for the Vocabulary twin test, computed as the sum of the items scores. All 36 items have scores 0/1/2, hence the total score has values from 0 to 36.

* Vocabulary total score.
* All items have scores 0-2.
* Compute total score by summing (maximum possible is 36).
COMPUTE gvocabt1 = SUM(gvoc011, gvoc021, gvoc031, gvoc041, gvoc051, 
  gvoc061, gvoc071, gvoc081, gvoc091, gvoc101, gvoc111, gvoc121, 
  gvoc131, gvoc141, gvoc151, gvoc161, gvoc171, gvoc181).
EXECUTE.