added obesity and asthma as covariates with t1_resp score as outcome

This commit is contained in:
Tanushree Tunstall 2020-11-23 18:31:19 +00:00
parent 9158866dda
commit 7529549bfc

View file

@ -261,23 +261,25 @@ for(i in my_reg_params_meds1) {
cat("=================================================================================\n")
}
#-----------------------------
# outcome: death
# outcome: t1_resp_recoded ~ obesity + asthma
# data: fp adults
#-----------------------------
my_reg_params_meds1v2 = my_reg_params_meds[!my_reg_params_meds%in%c("mosaic"
my_reg_params_meds2v2 = my_reg_params_meds[!my_reg_params_meds%in%c("mosaic"
, "flustat"
, "onset_2_initial"
, "onsfindeath"
, "ia_exac_copd"
, "death")]
, "death"
, "t1_resp_recoded"
, "T1_resp_score"
, "asthma")]
for(i in my_reg_params_meds1v2) {
for(i in my_reg_params_meds2v2) {
#print (i)
p_form = as.formula(paste("death ~ ", i ,sep = ""))
p_form = as.formula(paste("t1_resp_recoded ~ obesity + asthma + ", i ,sep = ""))
print(p_form)
model_reg = glm(p_form , family = binomial, data = my_reg_data_med)
print(summary(model_reg))