这个作业是统计学的数据分析课程,需要用R语言统计糖尿病的实验测试结果

STA303H1S/STA1002HS Final Project

1背景
糖尿病是一种非常普遍的疾病,许多人将其与许多生活方式因素联系在一起。
临床研究。糖尿病患者的医疗结局往往比同类患者差
如果没有糖尿病,这些患者的医疗系统可能会非常昂贵。但是,不是
所有糖尿病患者对医疗系统的负担均相同。有趣的是
确定那些可能会出现较差结果的患者,以便针对他们
改善这些结果并降低成本的干预措施。
医疗保健费用不能总是直接衡量,而是重要措施之一
卫生服务研究中通常收集的可以作为这两种费用的替代物
对于健康状况不佳的情况,是在出院后的几天内再次入院
从医院;重新入学的费用很高,并且可能由于多种原因而发生,重要的原因是(a)
初次入住时护理不足(可能是出院太早)和(b)
无论最初的住院时间长短,患者的健康状况均不佳。
2数据集
为了进行分析,您将糖尿病数据集上传到了Quercus。这个数据集非常有名
用于统计分析。它包括代表患者和医院结果的50多种功能。
从数据库中提取满足以下条件的遭遇信息,
•这是一次住院经历(住院)。
•这是一种糖尿病的遭遇,即在此期间任何一种糖尿病都进入了糖尿病。
系统作为诊断。
•住院时间至少1天,最多14天。
•在相遇期间进行了实验室测试。
•在相遇期间服用药物。
该数据集包含来自71518位患者的101766条观察结果。那是一些病人有更多
多于一项观察。遭遇被存储在变量遭遇ID和患者中
ID存储在可变患者nbr中。
2.1回应
结果是名为“ mitmitted”的readmission变量。此变量具有三类:
1.不重新录取;
2.不到30天的再次入院(这种情况不好,因为可能是您的治疗
不适当);
3.超过30天的重新录取(此录取不如最后一次录取好,但是,
原因可能是患者的状态)。
您可以将变量与原始类别一起使用,也可以将其分为“无重新录入”和“重新录入”。这是你的选择。
3
2.2预测变量/协变量
数据集中有许多协变量。数据包含种族,性别,
年龄,入院类型,住院时间,主治医师的医学专业,实验室数量
进行的检查,HbA1c的检查结果,诊断,用药次数,糖尿病用药次数,住院前一年的门诊病人数,住院病人数和急诊就诊次数等。
以下变量不应被视为协变量,“遇到ID”,“患者nbr”,
“许可来源ID”,“付款人代码”,“重新输入”和“遇到人数”。前四个变量是一些标识变量。 “重新提交”是响应,“遇到人数”
变量表示每个患者遇到的次数。
3 Task
Using patient characteristics available from hospital, identify groups of patients who are at different
risk of readmission. To answer this question you can use any statistical technique that you learned
from the course. However, you need to explain your choice. You should focus on the follwoing
aspects:
1. There are many covariates in the dataset. For predicting the probability of a patient being
readmitted please select maximum 9-10 covariates. You need to explain why and how you
choose the 9-10 covariates for prediction.
2. Since this is a prediction problem you should make one test dataset which you will never
use for modelling. Create a test dataset that contains a random selection of 20000 patients.
You should not sample from the encounters. you have randomly choose the patients using
‘patient nbr’ variable. You will find the %in% code in R very useful for this purpose. You
should use your student ID as the seed for the sampling.
3. You can fit a GLMM, GLM or GAM (or any other method). But since this is a longitudinal
dataset you need to explain what assumptions you need to make to fit a GLM or any other
model which assumes independence. If you use GLM then variable selection and prediction
becomes very easy, which is not trivial for GLMM. GLMM is, however, the most appropriate
analysis technique for this data, but due to the large structure of the data GLMMs may take
a long time and may not converge. Thus, you need to properly explain how you choose the
modelling technique and also if you fail to perform certain analyses then state that clearly in
the limitation section.
4. Make sure to perform exploratory data analysis (basic summary statistics, plots etc.) before
moving on to the final modelling.
5. You can do some literature review if that helps.
4