# -*- coding: utf-8 -*-
"""
Regression lineaire avec des listes en entrées
"""
import matplotlib.pyplot as plt
import numpy as np
import statsmodels.api as sm
#Farm size in hectares
X=[1,1,2,2,2.3,3,3,3.5,4,4.3]
#Crop yield in tons
Y=[6.9,6.7,13.8,14.7,16.5,18.7,17.4,22,29.4,34.5]
"""
# By default, OLS implementation of statsmodels does not include an intercept
# in the model unless we are using formulas.
# We need to explicitly specify the use of intercept in OLS method by
# adding a constant term.
X_1 = sm.add_constant(X)
#print(X_1)