Skip to content

Instantly share code, notes, and snippets.

@naenumtou
Created October 3, 2022 13:25
Show Gist options
  • Save naenumtou/66a2fd82398cf7391fb43045ae1b78c9 to your computer and use it in GitHub Desktop.
Save naenumtou/66a2fd82398cf7391fb43045ae1b78c9 to your computer and use it in GitHub Desktop.
# Select variables for linear regression model
X = sm.add_constant(df[['GDP_C_lg12', 'MPI_C_lg12']]) #Add intercept
y = df['logitODR']
# Linear regression model
model = sm.OLS(y, X)
result = model.fit()
print(result.summary())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment