[R] Model Comparision for case control studies in R

anteneh asmare h@n@tezer@ @end|ng |rom gm@||@com
Wed Jun 15 13:29:28 CEST 2022


y<-c(0,1,1,0,0,1,0,0,1,1,1,0,1,1,1,0,0,0,0,1)
age<-c(45,23,56,67,23,23,28,56,45,47,36,37,33,35,38,39,43,28,39,41)
smoking<-c(0,1,1,1,0,0,0,0,0,1,1,0,0,1,0,1,1,1,0,1)
hypertension<-c(1,1,0,1,0,1,0,1,1,0,1,1,1,1,1,1,0,0,1,0)
data<-data.frame(y,age,smoking,hypertension)
data
model<-glm(y~age+factor(smoking)+factor(hypertension), data, family =
binomial(link = "logit"),na.action = na.omit)
summary(model)
from above sample data I want to study a case-control study on male
individuals with my response variable y, disease status (1=Case,
0=Control) with covariates age, smoking status(1=Yes, 0=No)  and
hypertension, hypertensive (1=Yes, 0=No). I want to fit the model to
predict the disease status using at least two different methods. And
to make model comparisons. I think logistic regression will be the
best fit for this case control study. Do we have other options in
addition to logistic regression? My objective is to fit the model to
predict the disease status using at least two different methods.
Kind regards,
Hana



More information about the R-help mailing list