Assessment
Length: 2,500 words max (excluding tables, bibliographies, appendices, diagrams, pictures, graphs, and associated captions) – 1,500 words for the 1st and 1000 words for the 2nd part.
This assignment is split in 2 parts. You will be provided with 2 artificial datasets (one for each part) constructed to resemble data taken from electronic health records and a document describing what the contents are and a set of research questions. You are asked to explore, describe and analyse the datasets appropriately. We recommend using either Stata or R.
The actual datasets will be made available partway through the taught component of the module.
PART A
Utilise the exam_data_2024A.dta dataset to develop a model that predicts the presence of diabetes based on various physiological and genetic markers. You will conduct exploratory data analyses, model building, validation and sensitivity analysis to understand the effectiveness and robustness of your model.
The dataset contains the following variables:
patient_idUnique patient identifier
pregnanciesNumber of times pregnant
glucoseBlood glucose concentration over two hours in an oral glucose tolerance test
blood_pressureDiastolic blood pressure (mmHg)
skin_thicknessTriceps skinfold thickness (mm)
insulinTwo-hour serum insulin (μU/ml)
BMIBody mass index (kg / m2)
diabetes_genetic_scoreGenetic score for diabetes
ageAge in years
diabetesPresence (1) or absence (0) of diabetes
Guidelines on how to write your report (part A)
Your report should include the following elements:
A detailed description of how each variable is treated including measures of central tendency and dispersion, any identification of outliers and any decisions to categorise continuous variables into clinically significant groups.
Include a discussion of your modelling decisions made. Justification for any transformation of your predictors (e.g. continuous variables transform into categories if needed) and any creation of new features (interaction terms).
Description of model evaluation including the metrics (sensitivity, specificity etc) used to implement internal validation and rationale for choosing them.
Description of any sensitivity analyses (e.g., subgroup analyses by age, BMI categories) conducted to assess model robustness.
An interpretation of the results and conclusion about the overall study question.
PART B
The 2nd dataset is from a sample of 10K individuals from the Electronic Health Records. We set as baseline the 1st date their Body Mass Index (BMI) was recorded and we also collected information on other characteristics. Individuals were followed up for 5 years and we want to estimate the relationship between smoking cessation (exposure of interest) and the 5-year BMI change (%). In addition, data at baseline is provided on the participant’s sex, age, education, CVD, dementia, diuretics. All individuals were smokers at baseline
The question in the 2nd dataset you are asked to address in your analysis and report is the following: "What is the effect of smoking cessation on BMI change?”
The data will be contained in the file exam_data_2024B.dta on Moodle. The dataset contains the following variables:
VariableDescription
idID
sexSex
ageAge at baseline
educationlevel education: values 1 (low) to 5 (high)
n_cigarettesN of cigarettes smoking (per day)
CVDPrevalent CVD at baseline; No=0, Yes=1
dementiaPrevalent dementia at baseline; No=0, Yes=1
diureticsUse of diuretics at baseline; No=0, Yes=1
bmiBody mass index (in kg/m2) - measured at baseline
smoking_cessationQuit smoking between baseline and the end of follow-up; No=0, Yes=1
bmi_ch_percentBMI change (%)
Guidelines on how to write your report (part B)
Your report should include the following elements:
1)A descriptive presentation of the dataset
2)Use of an outcome regression model (i.e. a simple linear regression) and estimation of the relationship between smoking cessation and BMI change after 5 years, with and without adjusting for other variables. Interpretation of the results
3)Use of universe probability weighting to adjust for baseline confounders and estimation of the relationship between smoking cessation and BMI change.
4)Use of the g-formula to estimate the BMI change after 5 years in this sample, a) had nobody quitted smoking, b) had all the individuals quitted smoking. What is the average causal effect of smoking cessation on BMI change after 5 years?
5)Comparison of the findings and discussion of the assumptions you need to estimate the average causal effect between smoking cessation and BMI change and the potential bias you may have in this study.
In your report, you do not need to explain the design of the study or provide detail of the data collection methods. You should not need to cite literature regarding the clinical question. You will be assessed on your application of statistical methods and your interpretation of the results. However, you should make sure that the statistical methods that you employ are suitable for the study design, as described in the text above.
We would like you to provide much more detail regarding the statistical methods used than would commonly be provided in a published study report. Do not paste output directly from Stata but transfer results to appropriate text or table formats.
The main text of your report should be at most 2,500 words max (excluding tables, bibliographies, appendices, diagrams, pictures, graphs, and associated captions) – 1,500 words for the 1st and 1000 words for the 2nd part.. An additional six tables or figures (at most) can be presented. Please put these after the main text. Note: these are an upper limit; you do not have to reach these limits. You should be able to get full marks with fewer words and tables/figures.
You can also use GenAI for refining and editing your work, such as to correct grammar/ spelling, suggest synonyms and provide structural edits. GenAI can therefore be used to make improvements to the clarity or quality of your work to improve the final output, but it cannot be used to create new/original content that was not written, at least in draft form, first by you.
You must submit the Stata code used to perform the analyses. The markers must be able to replicate the results presented in your report by re-running the do-file on the provided dataset. While there are no marks directly assigned to the do-file, you will not be able to meet the marking criteria given without one. You may perform the required analyses in a statistical program other than Stata (e.g. R, SPSS, SAS). If you wish to do this, you must submit the equivalent of the Stata do-file appropriate to your chosen software.