Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A logistic Regression Model for estimating Vaccine Efficacy
import pandas as pd
import numpy as np
from patsy import dmatrices
import statsmodels.api as sm
#Use Pandas to load the data set into a Dataframe
df = pd.read_csv('vaccine_trial_simulation_study.csv', header=0)
#Print the top 10 rows
#Form the regression equation
#We'll use Patsy to carve out the X and y matrices
y_train, X_train = dmatrices(expr, df, return_type='dataframe')
#Build and train a Logit model
logit_model = sm.Logit(endog=y_train, exog=X_train)
logit_results =
#Print the model summary
Copy link

rcsmit commented Oct 30, 2021

Thank you for your tutorial

How do I get the confidence bounds from the summary in Python?

Copy link

rcsmit commented Oct 30, 2021

I succeeded to do also the last part in Python :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment