This topic is for those who interested in how to use logistic regression model for basic epidemiology study with R. This topic is a part of FETP biostatistic course so I can not provide the dataset for you.
##Setting up environment
library(tidyverse)#For data manipulation and plot.
library(haven)#For import .dta file.
library(pubh)#For basic epidemiology study.
library(jtools)#For export model result into nice form table.
library(kableExtra)#For export model result into nice form table.
        Logistic regression is a statistical regression model with aim to quantify the odds of binary events of interest (outcome) with provided one or more variables (predictors). Formally in logistic regression the outcome in dataset coded by a factor 0 for absense of outcome and 1 for present of outcome while the predictors can each be binary or continuous data.  
        Example of simple logistic regression.The low birth dataset (lbw) is a dataset about the newborn weight (bwt) in grams with the related variable of their mother such as mother's age, smoking or not, weight, and rece.The dataset also provided binary outcome of baby weight which classify into low birth weight (low =1), and not low birth weight (low=0).
lbw <- haven::read_dta("lowbwt_dat.dta")
head(lbw) 
IDlowagelwtracesmokeptlhtuiftvbwt_Irace_2_Irace_3
850191822000102.52e+0310
860331553000032.55e+0301
870201051100012.56e+0300
880211081100122.59e+0300
890181071100102.6e+03 00
910211243000002.62e+0301

Let try fitting simple logistic regression with mother’s weight (lwt) in pounds as the predictor and the baby low birth weight (low) as outcome.

mother_weight_lbw <- glm(data = lbw, low~lwt,
                         family = binomial(link = "logit"))
##Use glm() function in R with binomial famiry and logistic (logit) as link function
summ(mother_weight_lbw,
     confint = TRUE,
     digits = 3,
     model.info = FALSE, 
     model.fit = FALSE)
Est. 2.5% 97.5% z val. p
(Intercept) 0.998 -0.541 2.537 1.271 0.204
lwt -0.014 -0.026 -0.002 -2.279 0.023
Standard errors: MLE

The slope of lwt is -0.014 mean that log odds of being low birth weight in newborn decrease by 0.014 for each 1 pound increase in mother’s weight. we can transform the slope (log-odds) to odds by anti-log (exp) function. The p value of slope (0.023) show that mother’s weight is a significant effect newborn chance of being low birth weight.

exp(mother_weight_lbw$coefficients)
## (Intercept)         lwt 
##   2.7137035   0.9860401

The result show that odds of being low birth weight in newborn decrease by 0.014 (1 - 0.986) for each 1 pound increase in mother weight.
Let try fitting multiple logistic regression. Now I will add more predictors into a model.
If we want to know how smoking effect the chance of being low birth weight of newborn after eliminate mother’s age weight, race and umber of physician visits during first trimester (ftv).We can use multiple logistic regression to adjust variables.

lbw_model1 <- glm(data = lbw,
                  low~ age+lwt+factor(smoke)+factor(race)+ftv,
                  family = binomial(link = "logit"))
#Since smoking status and race is a category data with indicator variable we have to set these variable as factor to let R know this.
sjPlot::tab_model(lbw_model1,
                  show.r2 = FALSE,
                  digits = 3,
                  title = "Summary of lbw_model1",
                  show.intercept = FALSE,
                  pred.labels = c( "Age of mother (years)", 
                                  "Weight of mother (pounds)", 
                                  "Mother is smoker",
                                   "Mother's race (Black)", 
                                  "Mother's race (Other)", 
                  "Number of physician visit during 1st trimeter"))
Summary of lbw_model1
  low birth weight
Predictors Odds Ratios CI p
Age of mother (years) 0.978 0.912 – 1.046 0.522
Weight of mother (pounds) 0.988 0.974 – 1.000 0.052
Mother is smoker 2.867 1.377 – 6.187 0.006
Mother’s race (Black) 3.425 1.246 – 9.628 0.017
Mother’s race (Other) 2.564 1.143 – 5.939 0.024
Number of physician visit during 1st trimeter 0.992 0.710 – 1.360 0.963
Observations 189

Interpretation : The odds of being low birth weight of newborn increase by 1.867 times if mother is a smoker after adjusted for mother’s age, weight, race and number of physician visits during first trimester.And smoking status mother is a statistical significant relate to newborn low birth weight.