Please run each do file in consecutive order, except for 2_ and 3_ which will be run within '1_master_dataclean'. This zipped folder contains the following do files:

0_nonresponse
> Calculates the % of non-response (Don't know and Refused to answer) for each individual as an average across all their responses
> The average 'Don't know' or 'Refused to Answer' responses are then the average of all the individual percentages

1_master_dataclean
> Cleans the data to categorise the variables needed for data analyses. This is saved as 'ggs_clean'.
> Matches the UK GGS data with restricted paradata to assess data quality. This is saved separately as 'ggs_paradata_matched'. 
> Matches with non-response data, as calculated in do file above.

------ This is run within 1_master_dataclean -------------------------
2_numberchildren_edit
> Do file is obtained from https://www.ggp-i.org/research-and-impact/scientific-output/user-syntax/ "how to calculate number of children in GGS-II" but edited to ensure missing values correspond to the UK GGS datafile. This is because the UK GGS captures information about complex families; e.g., children outside the household, adopted children, children of new partners etc. 
----------------------------------------------------------------------

3_chisquaredtest
> Runs the full set of chi-squared tests of demographic and survey characteristics by conditions. 
> The first set of loops are for binary categories. The loops creates an excel where each characteristics and qr code chi-square test output is added to a tab
> The second set of loops are for categorical variables beginning with '1'.

4_qualitycheck
> Syntax to check the data quality by QR/URL condition. Chi-squared tests are run manually for majority of data quality checks
> To test for extreme responses: A loop is used to output the responses by blocks of attitudinal questions onto excel, for ease of viewing the results
> To test for straightlining, we use the stata code -nondiff-, -sd-, and -cv-

Data used for this analyses are the following:
UK Generations and Gender Survey: http://doi.org/10.5255/UKDA-SN-9247-1 from the UK Data Service. For this syntax, we are naming it -ukggs-
Paradata collected during the survey which consists of: 1) paradata_time 2) paradata_firstlast 3) paradata_sessiontiming 4) paradata_sessiondevice.
Note that data for Figure 2 is tracking information obtained during the survey administration.